Skip to content

Commit 416e8c0

Browse files
committed
Fix build issues
- minimal update dependencies to address advisory issues - fix clippy errors
1 parent b300aa8 commit 416e8c0

9 files changed

Lines changed: 296 additions & 204 deletions

File tree

Cargo.lock

Lines changed: 270 additions & 181 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ clap_complete = "4.5.13"
1919
console = {version = "0.15.8"}
2020
env_logger = { version = "0.11.5" }
2121
log = { version = "0.4.22" }
22-
openssl = { version = "0.10.64", optional = true }
23-
reqwest = { version = "0.12.7", default-features = false, features = ["json", "multipart"] }
22+
openssl = { version = "0.10.75", optional = true }
23+
reqwest = { version = "0.12.28", default-features = false, features = ["json", "multipart"] }
2424
serde = { version = "1.0.210", features = ["derive"] }
2525
serde_json = "1.0.128"
2626
snafu = { version = "0.8.5" }
2727
tokio = { version = "1", features = ["full"] }
2828
futures = { version = "0.3" }
29-
regex = { version = "1.11.0" }
29+
regex = { version = "1.12.3" }
3030
iso8601-timestamp = { version = "0.2.17" }
3131
toml = { version = "0.8.19" }
3232
git2 = { version = "0.19.0", default-features = false, features = [ "vendored-libgit2", "https", "ssh" ]}

deny.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ allow = [
44
"Apache-2.0",
55
"0BSD",
66
"Unicode-3.0",
7-
"ISC",
87
"BSD-3-Clause",
8+
"MPL-2.0"
99
]
1010

1111
[[licenses.clarify]]
@@ -20,7 +20,6 @@ ignore = [
2020
# https://github.com/ramosbugs/openidconnect-rs/issues/140
2121
"RUSTSEC-2023-0071",
2222

23-
# https://rustsec.org/advisories/RUSTSEC-2024-0320
24-
# used by comrak
25-
"RUSTSEC-2024-0320"
23+
# https://rustsec.org/advisories/RUSTSEC-2023-0071
24+
"RUSTSEC-2023-0071"
2625
]

src/cli/cmd/login.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ use snafu::{ResultExt, Snafu};
1313
/// The login consists of two parts:
1414
///
1515
/// 1. Renku is queried to return a temporary URL that can be used to
16-
/// authenticate and authorize this application. The url must be
17-
/// opened with some device and the user code must be entered (if
18-
/// necessary).
16+
/// authenticate and authorize this application. The url must be
17+
/// opened with some device and the user code must be entered (if
18+
/// necessary).
1919
///
2020
/// 2. Once the first step is complete, the cli can obtain an access
21-
/// token and does so by periodically polling the renku platform.
21+
/// token and does so by periodically polling the renku platform.
2222
///
2323
/// The login command can do these two steps separately. This requires
2424
/// to run with `--user-code-only` to omit the second step and store
@@ -68,7 +68,7 @@ enum Steps<'a> {
6868
Complete,
6969
}
7070
impl Input {
71-
fn get_steps(&self) -> Steps {
71+
fn get_steps(&self) -> Steps<'_> {
7272
if let Some(p) = &self.continue_from {
7373
Steps::Continue(p)
7474
} else if self.user_code_only {

src/cli/cmd/project/clone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl Input {
114114
}
115115
}
116116

117-
async fn clone_project<'a>(
117+
async fn clone_project(
118118
ctx: Context,
119119
project: &ProjectDetails,
120120
target: PathBuf,

src/cli/cmd/userdoc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ enum OutputOption<'a> {
7575
Stdout,
7676
}
7777
impl Input {
78-
fn get_output(&self) -> OutputOption {
78+
fn get_output(&self) -> OutputOption<'_> {
7979
if let Some(f) = &self.output_file {
8080
OutputOption::OutFile(f.as_path())
8181
} else if let Some(f) = &self.output_dir {

src/cli/cmd/version.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub struct Versions<'a> {
5656
pub renku_url: &'a str,
5757
}
5858
impl Versions<'_> {
59-
pub fn create(server: VersionInfo, renku_url: &str) -> Versions {
59+
pub fn create(server: VersionInfo, renku_url: &str) -> Versions<'_> {
6060
Versions {
6161
client: BuildInfo::default(),
6262
server,

src/data/project_id.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fn read_to_string() {
6969
let id2 = ProjectId::Id("pr-id-42".into());
7070
let id3 = ProjectId::FullUrl(RenkuUrl::parse("http://localhost/project/1").unwrap());
7171

72-
for id in vec![id1, id2, id3] {
72+
for id in [id1, id2, id3] {
7373
let id_str = format!("{}", id);
7474
let id_parsed = ProjectId::parse(&id_str).unwrap();
7575
assert_eq!(id, id_parsed);

tests/common/mod.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
11
use assert_cmd::cargo::CargoError;
22
use assert_cmd::prelude::*;
3+
use snafu::Snafu;
34
use std::{io, process::Command};
45

5-
#[derive(Debug)]
6+
#[derive(Debug, Snafu)]
67
pub enum Error {
7-
Cargo(CargoError),
8-
IO(io::Error),
9-
Json(serde_json::Error),
8+
#[snafu(display("Cargo Error: {}", source))]
9+
Cargo { source: CargoError },
10+
#[snafu(display("IO Error: {}", source))]
11+
IO { source: io::Error },
12+
#[snafu(display("JSON Error: {}", source))]
13+
Json { source: serde_json::Error },
1014
}
1115
impl std::convert::From<CargoError> for Error {
1216
fn from(e: CargoError) -> Self {
13-
Error::Cargo(e)
17+
Error::Cargo { source: e }
1418
}
1519
}
1620
impl std::convert::From<io::Error> for Error {
1721
fn from(e: io::Error) -> Self {
18-
Error::IO(e)
22+
Error::IO { source: e }
1923
}
2024
}
2125
impl std::convert::From<serde_json::Error> for Error {
2226
fn from(e: serde_json::Error) -> Self {
23-
Error::Json(e)
27+
Error::Json { source: e }
2428
}
2529
}
2630

0 commit comments

Comments
 (0)