Skip to content

Commit

Permalink
Merge pull request #36 from k9withabone/rust-v1.82-clippy-lints
Browse files Browse the repository at this point in the history
chore(lints): Rust v1.82 Clippy lint fixes
  • Loading branch information
k9withabone authored Oct 20, 2024
2 parents 2f27591 + 9c18279 commit 83c9b30
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
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

0 comments on commit 83c9b30

Please sign in to comment.