aboutsummaryrefslogtreecommitdiffstats
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/colors/src/custom.rs5
-rw-r--r--crates/yt/src/commands/download/mod.rs10
-rw-r--r--crates/yt/src/commands/select/mod.rs2
3 files changed, 7 insertions, 10 deletions
diff --git a/crates/colors/src/custom.rs b/crates/colors/src/custom.rs
index fd6b7b3..47283ec 100644
--- a/crates/colors/src/custom.rs
+++ b/crates/colors/src/custom.rs
@@ -13,6 +13,10 @@
const U8_TO_STR: [[u8; 3]; 256] = generate_lookup();
+#[expect(
+ clippy::cast_possible_truncation,
+ reason = "We deal only with < 256 numbers, they fit."
+)]
const fn generate_lookup() -> [[u8; 3]; 256] {
let mut table = [[0, 0, 0]; 256];
@@ -32,6 +36,7 @@ const fn generate_lookup() -> [[u8; 3]; 256] {
#[derive(Clone, Copy)]
pub(crate) enum Plane {
Fg,
+ #[expect(unused)]
Bg,
}
diff --git a/crates/yt/src/commands/download/mod.rs b/crates/yt/src/commands/download/mod.rs
index 148aebb..d025f37 100644
--- a/crates/yt/src/commands/download/mod.rs
+++ b/crates/yt/src/commands/download/mod.rs
@@ -8,11 +8,8 @@
// You should have received a copy of the License along with this program.
// If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
-use anyhow::Context;
use clap::Parser;
-use crate::shared::bytes::Bytes;
-
mod implm;
#[derive(Parser, Debug)]
@@ -27,10 +24,3 @@ pub(super) struct DownloadCommand {
#[arg(short, long, default_value_t = usize::MAX)]
count: usize,
}
-
-fn byte_parser(input: &str) -> Result<u64, anyhow::Error> {
- Ok(input
- .parse::<Bytes>()
- .with_context(|| format!("Failed to parse '{input}' as bytes!"))?
- .as_u64())
-}
diff --git a/crates/yt/src/commands/select/mod.rs b/crates/yt/src/commands/select/mod.rs
index 085c244..ab8e6b0 100644
--- a/crates/yt/src/commands/select/mod.rs
+++ b/crates/yt/src/commands/select/mod.rs
@@ -171,6 +171,7 @@ impl SelectCommand {
#[derive(Clone, Debug, Copy)]
struct OptionalNaiveDate {
+ #[expect(unused)]
date: Option<NaiveDate>,
}
impl FromStr for OptionalNaiveDate {
@@ -187,6 +188,7 @@ impl FromStr for OptionalNaiveDate {
}
#[derive(Clone, Debug)]
struct OptionalPublisher {
+ #[expect(unused)]
publisher: Option<String>,
}
impl FromStr for OptionalPublisher {