mirror of
https://codeberg.org/icewind/logsmash.git
synced 2026-06-03 18:14:11 +02:00
nixpkgs 25.11, clippy fixes
This commit is contained in:
parent
600e51ccf4
commit
564d719bb9
11 changed files with 39 additions and 36 deletions
34
flake.lock
generated
34
flake.lock
generated
|
|
@ -2,11 +2,11 @@
|
|||
"nodes": {
|
||||
"crane": {
|
||||
"locked": {
|
||||
"lastModified": 1748970125,
|
||||
"narHash": "sha256-UDyigbDGv8fvs9aS95yzFfOKkEjx1LO3PL3DsKopohA=",
|
||||
"lastModified": 1763938834,
|
||||
"narHash": "sha256-j8iB0Yr4zAvQLueCZ5abxfk6fnG/SJ5JnGUziETjwfg=",
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"rev": "323b5746d89e04b22554b061522dfce9e4c49b18",
|
||||
"rev": "d9e753122e51cee64eb8d2dddfe11148f339f5a2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -22,11 +22,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751287849,
|
||||
"narHash": "sha256-tpOX5x+Chodk/v8wYIzncX5Sq7mbKe0mMAWN0leYpCI=",
|
||||
"lastModified": 1764593611,
|
||||
"narHash": "sha256-6SdexcO69Dlu14YN2xuB1A6JHWSrcqMj7Na9oK7IT2M=",
|
||||
"owner": "nix-community",
|
||||
"repo": "flakelight",
|
||||
"rev": "16a2ab5cdc789682d80c2c8511df338fd13fc1ca",
|
||||
"rev": "0d63256401341f528dd628f1a8e96d3afecade7a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -44,11 +44,11 @@
|
|||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751383294,
|
||||
"narHash": "sha256-Yg24QBWnVojoD7jVH47BFYkMmjWaZKeJNMqCI75bYLo=",
|
||||
"lastModified": 1764619631,
|
||||
"narHash": "sha256-WojMP5S9qLmOLecEQ+7+yc33Ly1ydoRsODNG6hlLqiQ=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "114f11c2a3af921dc5ef459ce7f2636dfab7171e",
|
||||
"revCount": 55,
|
||||
"rev": "0fae557bf52d8493840aca52d433c473ecc305ef",
|
||||
"revCount": 67,
|
||||
"type": "git",
|
||||
"url": "https://codeberg.org/icewind/mill-scale.git"
|
||||
},
|
||||
|
|
@ -59,16 +59,16 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1751211869,
|
||||
"narHash": "sha256-1Cu92i1KSPbhPCKxoiVG5qnoRiKTgR5CcGSRyLpOd7Y=",
|
||||
"lastModified": 1764522689,
|
||||
"narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b43c397f6c213918d6cfe6e3550abfe79b5d1c51",
|
||||
"rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-25.05",
|
||||
"ref": "nixos-25.11",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
|
|
@ -88,11 +88,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750214276,
|
||||
"narHash": "sha256-1kniuhH70q4TAC/xIvjFYH46aHiLrbIlcr6fdrRwO1A=",
|
||||
"lastModified": 1764557621,
|
||||
"narHash": "sha256-kX5PoY8hQZ80+amMQgOO9t8Tc1JZ70gYRnzaVD4AA+o=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "f9b2b2b1327ff6beab4662b8ea41689e0a57b8d4",
|
||||
"rev": "93316876c2229460a5d6f5f052766cc4cef538ce",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-25.05";
|
||||
nixpkgs.url = "nixpkgs/nixos-25.11";
|
||||
flakelight = {
|
||||
url = "github:nix-community/flakelight";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ pub trait Archive {
|
|||
}
|
||||
|
||||
pub trait ArchiveEntry {
|
||||
fn name(&self) -> Cow<str>;
|
||||
fn name<'a>(&'a self) -> Cow<'a, str>;
|
||||
|
||||
fn extract(self) -> Result<Vec<u8>, ReadError>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ pub struct RarEntry {
|
|||
}
|
||||
|
||||
impl ArchiveEntry for RarEntry {
|
||||
fn name(&self) -> Cow<str> {
|
||||
fn name<'a>(&'a self) -> Cow<'a, str> {
|
||||
self.name.as_str().into()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ pub struct SevenZipEntry<'a, R: Read + Seek> {
|
|||
}
|
||||
|
||||
impl<R: Read + Seek> ArchiveEntry for SevenZipEntry<'_, R> {
|
||||
fn name(&self) -> Cow<str> {
|
||||
fn name<'a>(&'a self) -> Cow<'a, str> {
|
||||
self.name.as_str().into()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ impl TarEntry {
|
|||
}
|
||||
|
||||
impl ArchiveEntry for TarEntry {
|
||||
fn name(&self) -> Cow<str> {
|
||||
fn name<'a>(&'a self) -> Cow<'a, str> {
|
||||
self.name.as_str().into()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ impl<R: Read + Seek> ZipArchive<R> {
|
|||
}
|
||||
|
||||
impl<R: Read + Seek> ArchiveEntry for ZipEntry<'_, R> {
|
||||
fn name(&self) -> Cow<str> {
|
||||
fn name<'a>(&'a self) -> Cow<'a, str> {
|
||||
self.path.as_str().into()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -214,11 +214,11 @@ impl<'a> LogLine<'a> {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn cleaned_message(&self) -> Cow<str> {
|
||||
pub fn cleaned_message<'this>(&'this self) -> Cow<'this, str> {
|
||||
clean_log_message(&self.message)
|
||||
}
|
||||
|
||||
pub fn cleaned_message_single_line(&self) -> Cow<str> {
|
||||
pub fn cleaned_message_single_line<'this>(&'this self) -> Cow<'this, str> {
|
||||
if self.message.contains('\t') || self.message.contains('\n') {
|
||||
Cow::Owned(self.message.replace(['\t', '\n'], " "))
|
||||
} else {
|
||||
|
|
@ -227,7 +227,7 @@ impl<'a> LogLine<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
fn clean_log_message(message: &str) -> Cow<str> {
|
||||
fn clean_log_message<'a>(message: &'a str) -> Cow<'a, str> {
|
||||
if message.contains('\t') {
|
||||
Cow::Owned(message.replace('\t', " "))
|
||||
} else {
|
||||
|
|
@ -308,7 +308,7 @@ impl FullLogLine {
|
|||
.filter(|(key, _)| *key != "app")
|
||||
}
|
||||
|
||||
pub fn cleaned_message(&self) -> Cow<str> {
|
||||
pub fn cleaned_message<'a>(&'a self) -> Cow<'a, str> {
|
||||
clean_log_message(&self.message)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ fn copy_osc(text: &str) {
|
|||
print!("\x1B]52;c;{}\x07", BASE64_STANDARD.encode(text));
|
||||
}
|
||||
|
||||
fn parse_line(mut line: &str) -> Result<LogLine, serde_json::Error> {
|
||||
fn parse_line<'a>(mut line: &'a str) -> Result<LogLine<'a>, serde_json::Error> {
|
||||
if let Some(pos) = line.find('{') {
|
||||
line = &line[pos..];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use ratatui::widgets::{Block, BorderType, Borders, Cell, Paragraph, Row, Wrap};
|
|||
use std::fmt::Write;
|
||||
use std::iter::once;
|
||||
|
||||
pub fn single_log(line: &FullLogLine) -> SingleLog {
|
||||
pub fn single_log<'a>(line: &'a FullLogLine) -> SingleLog<'a> {
|
||||
SingleLog::new(line)
|
||||
}
|
||||
|
||||
|
|
@ -129,7 +129,10 @@ impl StatefulWidget for SingleLog<'_> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn render_exception(exception: &FullException, path_prefix_length: usize) -> ScrollbarTable {
|
||||
pub fn render_exception<'a>(
|
||||
exception: &'a FullException,
|
||||
path_prefix_length: usize,
|
||||
) -> ScrollbarTable<'a> {
|
||||
let header = [
|
||||
Text::from("File"),
|
||||
Text::from("Line").alignment(Alignment::Right),
|
||||
|
|
@ -152,10 +155,10 @@ pub fn render_exception(exception: &FullException, path_prefix_length: usize) ->
|
|||
ScrollbarTable::new(rows, widths).header(header)
|
||||
}
|
||||
|
||||
fn exception_trace(
|
||||
exception: &FullException,
|
||||
fn exception_trace<'a>(
|
||||
exception: &'a FullException,
|
||||
path_prefix_length: usize,
|
||||
) -> impl Iterator<Item = Row> + '_ {
|
||||
) -> impl Iterator<Item = Row<'a>> + 'a {
|
||||
let exception_row = Row::new([
|
||||
Text::from(
|
||||
exception
|
||||
|
|
@ -175,7 +178,7 @@ fn exception_trace(
|
|||
once(exception_row).chain(trace_rows)
|
||||
}
|
||||
|
||||
fn trace_line(trace: &Trace, path_prefix_length: usize) -> Row {
|
||||
fn trace_line<'a>(trace: &'a Trace, path_prefix_length: usize) -> Row<'a> {
|
||||
Row::new([
|
||||
Text::from(
|
||||
trace
|
||||
|
|
@ -190,7 +193,7 @@ fn trace_line(trace: &Trace, path_prefix_length: usize) -> Row {
|
|||
])
|
||||
}
|
||||
|
||||
pub fn render_data(log: &FullLogLine) -> (ScrollbarTable, u16) {
|
||||
pub fn render_data<'a>(log: &'a FullLogLine) -> (ScrollbarTable<'a>, u16) {
|
||||
let header = [Text::from("Key"), Text::from("Value")]
|
||||
.into_iter()
|
||||
.map(Cell::from)
|
||||
|
|
|
|||
|
|
@ -713,7 +713,7 @@ impl<'a> UiState<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn footer_params(&self) -> FooterParams {
|
||||
pub fn footer_params<'this>(&'this self) -> FooterParams<'this> {
|
||||
match self.mode() {
|
||||
Mode::Normal => FooterParams::Normal { page: self.page() },
|
||||
Mode::FilterInput => FooterParams::FilterInput {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue