diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b691d97..b536193 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -27,7 +27,7 @@ jobs: # informationally check the latest as well. We should # regularly update the known good once we know that tests # pass on it - rust-toolchain: [ 1.75, stable, nightly ] + rust-toolchain: [ 1.77, stable, nightly ] steps: - uses: actions/checkout@v3 - name: Setup @@ -37,9 +37,9 @@ jobs: - name: Check clippy id: clippy run: .github/workflows/clippy.sh ${{ matrix.rust-toolchain }} - continue-on-error: ${{ matrix.rust-toolchain != '1.75' }} + continue-on-error: ${{ matrix.rust-toolchain != '1.77' }} - name: Store clippy flag - if: (matrix.rust-toolchain != '1.75') + if: (matrix.rust-toolchain != '1.77') run: | mkdir -p ./clippy-${{ matrix.rust-toolchain }} if [[ ${{ steps.clippy.outcome }} == "success" ]] ; then \ @@ -49,7 +49,7 @@ jobs: fi echo ${{ github.event.number }} > ./clippy-${{ matrix.rust-toolchain }}/issue_num - uses: actions/upload-artifact@v3 - if: (matrix.rust-toolchain != '1.75') + if: (matrix.rust-toolchain != '1.77') with: name: clippy-${{ matrix.rust-toolchain }} path: clippy-${{ matrix.rust-toolchain }}/ diff --git a/Cargo.toml b/Cargo.toml index a6fcb83..f0d9db8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ codespan-reporting = "0.11" flate2 = "1" is-terminal = "0.4" lalrpop-util = { version="0.20", default_features=false, features = ["lexer"] } -quick-xml = "0.30" +quick-xml = "0.31" sexp = "1.1" tar = "0.4" termcolor = "1.1" diff --git a/src/functions.rs b/src/functions.rs index c355680..d7faa93 100644 --- a/src/functions.rs +++ b/src/functions.rs @@ -2157,7 +2157,7 @@ impl<'a> FunctionArgument<'a> { None, )?; - ret.default_value = declared_arg.default.clone(); + ret.default_value.clone_from(&declared_arg.default); } Ok(ret) } diff --git a/src/internal_rep.rs b/src/internal_rep.rs index 3811d6b..38c6363 100644 --- a/src/internal_rep.rs +++ b/src/internal_rep.rs @@ -1431,7 +1431,7 @@ impl<'a> ClassList<'a> { if class == "any" { return true; } - self.classes.get(class).is_some() + self.classes.contains_key(class) } pub fn is_perm(&self, perm: &str, context: &BlockContext) -> bool { diff --git a/src/lib.rs b/src/lib.rs index 48be627..e488d51 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -54,7 +54,7 @@ pub fn compile_combined( let errors = CascadeErrors::new(); let policies = get_policies(input_files)?; let mut res = compile_machine_policies_internal(policies, vec!["out".to_string()], true)?; - let ret = match res.remove(&"out".to_string()) { + let ret = match res.remove("out") { Some(s) => s, None => return Err(CascadeErrors::from(InternalError::new())), };