fix a bunch of warnings!
This commit is contained in:
parent
b49032d5f4
commit
b48209a33a
6 changed files with 10 additions and 84 deletions
13
src/lib.rs
13
src/lib.rs
|
|
@ -41,7 +41,7 @@ pub(crate) mod prelude {
|
|||
use prelude::*;
|
||||
|
||||
pub mod args;
|
||||
pub use args::{AppendCmd, Args, DeltaCmd};
|
||||
pub use args::{AppendCmd, Args};
|
||||
mod color;
|
||||
pub use color::{_CLI_ENABLE_COLOR, SHOULD_COLOR};
|
||||
pub mod line;
|
||||
|
|
@ -80,11 +80,6 @@ static MK_OVERRIDE_RE: LazyLock<Regex> = LazyLock::new(|| {
|
|||
Regex::new(r"(?-u)\bmkOverride\s+\((?<priority>[\d-]+)\)").unwrap()
|
||||
});
|
||||
|
||||
#[tracing::instrument(level = "debug")]
|
||||
pub fn do_delta(args: Arc<Args>, delta_args: DeltaCmd) -> Result<(), BoxDynError> {
|
||||
todo!();
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "debug")]
|
||||
pub fn do_append(args: Arc<Args>, append_args: AppendCmd) -> Result<(), BoxDynError> {
|
||||
let filepath = Path::new(&args.file);
|
||||
|
|
@ -109,9 +104,9 @@ pub fn do_append(args: Arc<Args>, append_args: AppendCmd) -> Result<(), BoxDynEr
|
|||
|
||||
let new_pri_line = get_next_prio_line(
|
||||
source_file.clone(),
|
||||
append_args.name.into(),
|
||||
append_args.name,
|
||||
new_pri,
|
||||
append_args.value.into(),
|
||||
append_args.value,
|
||||
)?;
|
||||
|
||||
debug!("new_pri_line={new_pri_line}");
|
||||
|
|
@ -154,7 +149,7 @@ fn maybe_extract_prio_from_line(line: &SourceLine) -> Option<i64> {
|
|||
pub fn get_where(dynamic_nix: SourceFile) -> Result<i64, BoxDynError> {
|
||||
let lines = dynamic_nix.lines()?;
|
||||
let prio = lines
|
||||
.into_iter()
|
||||
.iter()
|
||||
.filter_map(maybe_extract_prio_from_line)
|
||||
.sorted_unstable()
|
||||
.next() // Priorities with lower integer values are "stronger" priorities.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue