Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
- selinux-version: '3.7'
rust-toolchain: nightly
- selinux-version: '3.7'
rust-toolchain: 1.81
rust-toolchain: 1.83
steps:
- uses: actions/checkout@v3
- name: Checkout selinux userspace
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "selinux-cascade"
version = "0.0.2"
description = "A High Level Language for specifying SELinux policy"
authors = ["Daniel Burgener <dburgener@linux.microsoft.com>", "Mickael Salaun <mic@linux.microsoft.com>"]
edition = "2018"
edition = "2021"
license = "MIT"
repository = "https://github.com/dburgener/cascade"
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ impl fmt::Display for Port {
Some(high) => format!("{}-{}", self.low_port_num, high),
None => self.low_port_num.to_string(),
};
write!(f, "{}", port_string)
write!(f, "{port_string}")
}
}

Expand Down Expand Up @@ -1328,7 +1328,7 @@ mod tests {
let result = if_block.get_renamed_statement(&renames);

// matches!() won't work because matching against box patterns is nightly only
let debug_str = format!("{:?}", result);
let debug_str = format!("{result:?}");
assert!(debug_str.contains("new_name"));
assert!(!debug_str.contains("old_name"));
assert!(debug_str.contains("unchanged"));
Expand Down
2 changes: 1 addition & 1 deletion src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,7 @@ pub fn get_synthetic_resource_name(
dom_name: &CascadeString,
associated_resource: &CascadeString,
) -> CascadeString {
let cs_name = format!("{}.{}", dom_name, associated_resource);
let cs_name = format!("{dom_name}.{associated_resource}");
// We keep the range of the *resource* part specifically, which should always be where this
// resource was defined
match associated_resource.get_range() {
Expand Down
9 changes: 3 additions & 6 deletions src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2226,7 +2226,7 @@ fn validate_cast(
"Cannot typecast",
file,
r,
format!("This is not something that can be typecast. {}", msg).as_ref(),
format!("This is not something that can be typecast. {msg}").as_ref(),
)
};

Expand Down Expand Up @@ -3408,7 +3408,7 @@ impl<'a> ArgForValidation<'a> {
) -> Result<WithWarnings<()>, ErrorItem> {
let err_ret = |msg: &str, r: Option<Range<usize>>| {
ErrorItem::make_compile_or_internal_error(
format!("Cannot typecast {}", msg).as_ref(),
format!("Cannot typecast {msg}").as_ref(),
file,
r,
"This is not something that can be typecast",
Expand Down Expand Up @@ -3997,10 +3997,7 @@ pub fn search_for_recursion(
"Recursive Function call found",
file,
range,
&format!(
"This function calls the next function: {}.",
previous_function
),
&format!("This function calls the next function: {previous_function}."),
));
previous_function = function_info.get_full_display_name();
}
Expand Down
2 changes: 1 addition & 1 deletion src/warning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ mod tests {
let mut ret = WithWarnings::from(warn_string);
if do_warn {
ret.add_warning(Warning::new(
&format!("Some warning {}", call_count),
&format!("Some warning {call_count}"),
file,
2..4, // doesn't matter for the test
"Some substring",
Expand Down
Loading