Skip to content

Commit

Permalink
chore(deps): update dependency rust to v1.83.0
Browse files Browse the repository at this point in the history
  • Loading branch information
davidB committed Dec 4, 2024
1 parent 76e86ca commit f9544a2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cdviz-collector/.mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ OTEL_TRACES_SAMPLER = "always_off"

[tools]
task = '3' # to have a set of simple commands for repetitive task (and CI)
rust = '1.82.0' # the rust tool stack (with cargo, fmt, clippy) to build source
rust = '1.83.0' # the rust tool stack (with cargo, fmt, clippy) to build source
binstall = '1.7.4' # do not use cargo-binstall (it's a special name used by mise)

[plugins]
Expand Down
2 changes: 1 addition & 1 deletion cdviz-collector/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#---------------------------------------------------------------------------------------------------
# checkov:skip=CKV_DOCKER_7:Ensure the base image uses a non latest version tag
# trivy:ignore:AVD-DS-0001
FROM rust:1.82.0 as build
FROM rust:1.83.0 as build
ARG PROFILE=release
ARG TARGET=x86_64-unknown-linux-musl

Expand Down
2 changes: 1 addition & 1 deletion cdviz-collector/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.82.0"
channel = "1.83.0"
10 changes: 5 additions & 5 deletions cdviz-collector/src/sources/opendal/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl Filter {
last > self.ts_after
&& last <= self.ts_before
&& meta.content_length() > 0
&& is_match(&self.path_patterns, entry.path())
&& is_match(self.path_patterns.as_ref(), entry.path())
} else {
tracing::warn!(path = entry.path(), "can not read last modified timestamp, skip");
false
Expand All @@ -41,11 +41,11 @@ impl Filter {
}

#[inline]
fn is_match<P>(pattern: &Option<GlobSet>, path: P) -> bool
fn is_match<P>(pattern: Option<&GlobSet>, path: P) -> bool
where
P: AsRef<std::path::Path>,
{
pattern.as_ref().map_or(true, |globset| globset.is_match(path))
pattern.map_or(true, |globset| globset.is_match(path))
}

pub(crate) fn globset_from(patterns: &[String]) -> Result<Option<GlobSet>> {
Expand Down Expand Up @@ -78,7 +78,7 @@ mod tests {
fn test_patterns_accept(#[case] patterns: Vec<&str>, #[case] path: &str) {
let patterns = patterns.into_iter().map(String::from).collect::<Vec<String>>();
let globset = globset_from(&patterns).unwrap();
assert!(is_match(&globset, path));
assert!(is_match(globset.as_ref(), path));
}

#[rstest]
Expand All @@ -89,6 +89,6 @@ mod tests {
fn test_patterns_reject(#[case] patterns: Vec<&str>, #[case] path: &str) {
let patterns = patterns.into_iter().map(String::from).collect::<Vec<String>>();
let globset = globset_from(&patterns).unwrap();
assert!(!is_match(&globset, path));
assert!(!is_match(globset.as_ref(), path));
}
}

0 comments on commit f9544a2

Please sign in to comment.