Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(lints): Rust v1.82 Clippy lint fixes #36

Merged
merged 1 commit into from
Oct 20, 2024
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
1 change: 1 addition & 0 deletions src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pub use self::{
/// [anchors and aliases](https://github.com/compose-spec/compose-spec/blob/master/10-fragments.md).
///
/// [compose-spec](https://github.com/compose-spec/compose-spec/blob/master/11-extension.md)
#[allow(clippy::too_long_first_doc_paragraph)] // false positive, see https://github.com/rust-lang/rust-clippy/issues/13315
pub type Extensions = IndexMap<ExtensionKey, YamlValue>;

/// A single item or a list of unique items.
Expand Down
1 change: 1 addition & 0 deletions src/service/ports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ impl Port {
/// # Errors
///
/// Returns ownership if this long syntax cannot be represented as the short syntax.
#[allow(clippy::result_large_err)]
pub fn into_short(self) -> Result<ShortPort, Self> {
if self.name.is_none()
&& self.app_protocol.is_none()
Expand Down
3 changes: 3 additions & 0 deletions src/service/volumes/mount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ impl Mount {
/// # Errors
///
/// Returns ownership if this long syntax cannot be represented as the short syntax.
#[allow(clippy::result_large_err)]
pub fn into_short(self) -> Result<ShortVolume, Self> {
match self {
Self::Volume(volume) => volume.into_short().map_err(Self::Volume),
Expand Down Expand Up @@ -269,6 +270,7 @@ impl Volume {
/// # Errors
///
/// Returns ownership if this long syntax cannot be represented as the short syntax.
#[allow(clippy::result_large_err)]
pub fn into_short(self) -> Result<ShortVolume, Self> {
match self {
Self {
Expand Down Expand Up @@ -399,6 +401,7 @@ impl Bind {
/// # Errors
///
/// Returns ownership if this long syntax cannot be represented as the short syntax.
#[allow(clippy::result_large_err)]
pub fn into_short(self) -> Result<ShortVolume, Self> {
match self {
Self {
Expand Down