Skip to content

Commit

Permalink
Bump rust to stable in actions runner
Browse files Browse the repository at this point in the history
Also addressed new clippy warnings.
  • Loading branch information
jpculp committed Aug 2, 2024
1 parent 864be9c commit 18791c1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
key: ${{ hashFiles('.github/cache_bust') }}-${{ runner.os }}-${{ matrix.make_target }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ hashFiles('.github/cache_bust') }}-${{ runner.os }}-${{ matrix.make_target }}
- run: rustup default 1.78.0
# print the current rustc. replace stable to pin to a specific toolchain version.
- run: rustup default stable
- run: rustup component add rustfmt
- run: rustup component add clippy
- run: make ${{ matrix.make_target }}
2 changes: 1 addition & 1 deletion tough/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl Repository {
/// * `metadata_outdir` is the directory where cached metadata files will be saved.
/// * `targets_outdir` is the directory where cached targets files will be saved.
/// * `targets_subset` is the list of targets to include in the cached repo. If no subset is
/// specified (`None`), then *all* targets are included in the cache.
/// specified (`None`), then *all* targets are included in the cache.
/// * `cache_root_chain` specifies whether or not we will cache all versions of `root.json`.
pub async fn cache<P1, P2, S>(
&self,
Expand Down
2 changes: 1 addition & 1 deletion tough/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ impl Repository {
/// [urllib.parse.quote] (given a 'safe' parameter value of `""`) which follows RFC 3986 and states
///
/// > Replace special characters in string using the %xx escape. Letters, digits, and the characters
/// `_.-~` are never quoted.
/// > `_.-~` are never quoted.
///
/// [urllib.parse.quote]: https://docs.python.org/3/library/urllib.parse.html#url-quoting
const CHARACTERS_TO_ESCAPE: AsciiSet = NON_ALPHANUMERIC
Expand Down
11 changes: 6 additions & 5 deletions tough/src/urlpath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ mod test {
.expect("Could not create URL from CARGO_MANIFEST_DIR");

let escaped_test_path = encode_filename("a/../b/././c/..");
let traversal_url = url_base.join(&escaped_test_path).expect(&format!(
"Could not create URL from unusual traversal path '{}' + '{}'",
url_base.to_string(),
escaped_test_path
));
let traversal_url = url_base.join(&escaped_test_path).unwrap_or_else(|_| {
panic!(
"Could not create URL from unusual traversal path '{}' + '{}'",
url_base, escaped_test_path
)
});

assert_eq!(
manifest_dir().join("a%2F..%2Fb%2F.%2F.%2Fc%2F.."),
Expand Down
2 changes: 1 addition & 1 deletion tuftool/src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub(crate) fn parse_key_source(input: &str) -> Result<Box<dyn KeySource>> {
PathOrUrl::Path(path) => Ok(Box::new(LocalKeySource { path })),
PathOrUrl::Url(url) => {
match url.scheme() {
#[cfg(any(feature = "aws-sdk-rust-native-tls", feature = "aws-sdk-rust-rustls"))]
#[cfg(any(feature = "aws-sdk-rust", feature = "aws-sdk-rust-rustls"))]
"aws-ssm" => Ok(Box::new(SsmKeySource {
profile: url.host_str().and_then(|s| {
if s.is_empty() {
Expand Down

0 comments on commit 18791c1

Please sign in to comment.