diff --git a/src/fs/fields.rs b/src/fs/fields.rs index 961f9eff2..6f8c4efa6 100644 --- a/src/fs/fields.rs +++ b/src/fs/fields.rs @@ -24,15 +24,18 @@ pub type gid_t = u32; /// The type of a file’s inode. +#[allow(unused)] pub type ino_t = u64; /// The type of a file’s number of links. +#[allow(unused)] pub type nlink_t = u64; /// The type of a file’s timestamp (creation, modification, access, etc). pub type time_t = i64; /// The type of a file’s user ID. +#[allow(unused)] pub type uid_t = u32; /// The type of user file flags @@ -123,6 +126,7 @@ pub struct OctalPermissions { /// multiple directories. However, it’s rare (but occasionally useful!) for a /// regular file to have a link count greater than 1, so we highlight the /// block count specifically for this case. +#[allow(unused)] #[derive(Copy, Clone)] pub struct Links { /// The actual link count. @@ -135,6 +139,7 @@ pub struct Links { /// A file’s inode. Every directory entry on a Unix filesystem has an inode, /// including directories and links, so this is applicable to everything exa /// can deal with. +#[allow(unused)] #[derive(Copy, Clone)] pub struct Inode(pub ino_t); @@ -151,10 +156,12 @@ pub enum Blocksize { /// The ID of the user that owns a file. This will only ever be a number; /// looking up the username is done in the `display` module. +#[allow(unused)] #[derive(Copy, Clone)] pub struct User(pub uid_t); /// The ID of the group that a file belongs to. +#[allow(unused)] #[derive(Copy, Clone)] pub struct Group(pub gid_t); diff --git a/src/output/mod.rs b/src/output/mod.rs index c36972af5..33691279b 100644 --- a/src/output/mod.rs +++ b/src/output/mod.rs @@ -5,7 +5,7 @@ // SPDX-FileCopyrightText: 2014 Benjamin Sago // SPDX-License-Identifier: MIT #[cfg(target_os = "windows")] -pub use self::cell::{DisplayWidth, TextCell, TextCellContents}; +pub use self::cell::TextCell; pub use self::escape::escape; pub mod color_scale; diff --git a/src/output/render/links.rs b/src/output/render/links.rs index d44db4225..e69cff53e 100644 --- a/src/output/render/links.rs +++ b/src/output/render/links.rs @@ -26,6 +26,7 @@ impl f::Links { } } +#[allow(unused)] pub trait Colours { fn normal(&self) -> Style; fn multi_link_file(&self) -> Style; diff --git a/src/output/render/mod.rs b/src/output/render/mod.rs index e81d6d149..23ff77378 100644 --- a/src/output/render/mod.rs +++ b/src/output/render/mod.rs @@ -46,6 +46,7 @@ pub use self::users::Colours as UserColours; pub use self::users::Render as UserRender; mod octal; +#[cfg(unix)] pub use self::octal::Render as OctalPermissionsRender; // octal uses just one colour diff --git a/src/output/render/octal.rs b/src/output/render/octal.rs index 155b3f691..385594124 100644 --- a/src/output/render/octal.rs +++ b/src/output/render/octal.rs @@ -9,6 +9,7 @@ use nu_ansi_term::Style; use crate::fs::fields as f; use crate::output::cell::TextCell; +#[allow(unused)] pub trait Render { fn render(&self, style: Style) -> TextCell; } diff --git a/src/output/render/permissions.rs b/src/output/render/permissions.rs index 71edd574e..2c88ca5b8 100644 --- a/src/output/render/permissions.rs +++ b/src/output/render/permissions.rs @@ -67,6 +67,7 @@ impl PermissionsPlusRender for Option { } } +#[allow(unused)] pub trait RenderPermissions { fn render(&self, colours: &C, is_regular_file: bool) -> Vec>; } diff --git a/src/theme/ui_styles.rs b/src/theme/ui_styles.rs index c151260c7..5f2b047a9 100644 --- a/src/theme/ui_styles.rs +++ b/src/theme/ui_styles.rs @@ -250,6 +250,7 @@ field_accessors!( ); #[rustfmt::skip] +#[allow(unused)] #[derive(Clone, Copy, Debug, Eq, Default, PartialEq, Serialize, Deserialize)] pub struct Links { pub normal: Option