Skip to content

Commit

Permalink
feat: bump toolchain to latest stable, 1.75.0
Browse files Browse the repository at this point in the history
Also fixed the warnings exposed by the newer rustc

This was motivated by an error only seen for apple targets:
tkaitchuck/aHash#195

Signed-off-by: Jim Crossley <[email protected]>
  • Loading branch information
jcrossley3 committed Jan 31, 2024
1 parent ae0ceeb commit d1a57dd
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion admin/src/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ async fn upload(
headers: Vec<String>,
id: Option<String>,
) -> anyhow::Result<()> {
let mut builder = client.post(url.clone());
let mut builder = client.post(url);
if let Some(id) = id {
builder = builder.query(&[("id", id)]);
}
Expand Down
2 changes: 1 addition & 1 deletion collectorist/api/src/coordinator/collectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl Collectors {
log::info!("check pkgs {}", collector.id);
if collector.config.interests.contains(&Interest::Package) {
log::info!("dispatch pkgs {}", collector.id);
futures.push(collector.collect_packages(state.clone(), request.purls.clone()));
futures.push(collector.collect_packages(state, request.purls.clone()));
}
}

Expand Down
4 changes: 2 additions & 2 deletions collectorist/api/src/coordinator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl Coordinator {
Entry::Git(_) => {}
Entry::Oci(_) => {}
Entry::Purl(purl) => {
self.add_purl(state.clone(), purl.as_str()).await.ok();
self.add_purl(state, purl.as_str()).await.ok();
}
Entry::GithubRelease(_) => {}
}
Expand All @@ -85,7 +85,7 @@ impl Coordinator {
state: &AppState,
request: CollectPackagesRequest,
) -> Vec<CollectPackagesResponse> {
state.collectors.collect_packages(state.clone(), request).await
state.collectors.collect_packages(state, request).await
}

pub async fn add_purl(&self, state: &AppState, purl: &str) -> Result<(), anyhow::Error> {
Expand Down
10 changes: 5 additions & 5 deletions collectorist/api/src/db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ impl Db {
r#"insert or ignore into purls (purl) values ($1)
"#,
)
.bind(purl.clone())
.bind(purl.clone())
.bind(purl)
.bind(purl)
.execute(&self.pool)
.await?;

Expand All @@ -46,7 +46,7 @@ impl Db {
r#"insert or ignore into vulnerabilities (id) values ($1)
"#,
)
.bind(vuln_id.clone())
.bind(vuln_id)
.execute(&self.pool)
.await?;

Expand Down Expand Up @@ -77,7 +77,7 @@ impl Db {
as_of: DateTime<Utc>,
) -> Result<(), anyhow::Error> {
sqlx::query(r#"replace into collector_purls (collector, purl, timestamp) VALUES ($1, $2, $3)"#)
.bind(collector_id.clone())
.bind(collector_id)
.bind(purl)
.bind(as_of)
.execute(&self.pool)
Expand All @@ -101,7 +101,7 @@ impl Db {
where
collector = $1 and purl = $2"#,
)
.bind(collector_id.clone())
.bind(collector_id)
.bind(purl.clone())
.fetch_optional(&self.pool)
.await?
Expand Down
1 change: 0 additions & 1 deletion index/src/s3dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use std::{
sync::Arc,
};

pub use s3::{creds::Credentials, Region};
use s3::{error::S3Error, Bucket};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::thread;
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.71.0"
channel = "1.75.0"
components = [ "rustfmt" ]

0 comments on commit d1a57dd

Please sign in to comment.