Skip to content

Commit

Permalink
Upgrade derive_more crate from 0.99.18 to 1.0.0 version (#199)
Browse files Browse the repository at this point in the history
- bump up MSRV to 1.75

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kai Ren <[email protected]>
  • Loading branch information
dependabot[bot] and tyranron authored Aug 14, 2024
1 parent 17c0645 commit f0bddf3
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 30 deletions.
44 changes: 32 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "baza"
version = "0.2.0"
edition = "2021"
rust-version = "1.70"
rust-version = "1.75"
description = "Simply scalable files storage without much fuss."
authors = ["Instrumentisto Team <[email protected]>"]
license = "BlueOak-1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Baza
====

[![CI](https://github.com/instrumentisto/baza/workflows/CI/badge.svg?branch=main "CI")](https://github.com/instrumentisto/baza/actions?query=workflow%3ACI+branch%3Amain)
[![Rust 1.70+](https://img.shields.io/badge/rustc-1.70+-lightgray.svg "Rust 1.70+")](https://blog.rust-lang.org/2023/06/01/Rust-1.70.0.html)
[![Rust 1.75+](https://img.shields.io/badge/rustc-1.75+-lightgray.svg "Rust 1.75+")](https://blog.rust-lang.org/2023/12/28/Rust-1.75.0.html)

[Docker Hub](https://hub.docker.com/r/instrumentisto/baza)
| [GitHub Container Registry](https://github.com/orgs/instrumentisto/packages/container/package/baza)
Expand Down
3 changes: 2 additions & 1 deletion api/s3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
name = "baza-api-s3"
version = "0.0.0"
edition = "2021"
rust-version = "1.70"
rust-version = "1.75"
description = "S3 HTTP API implementation of Baza."
authors = ["Instrumentisto Team <[email protected]>"]
license = "BlueOak-1.0.0"
publish = false

[dependencies]
baza = { package = "baza-lib", path = "../../lib" }
derive_more = { version = "1", features = ["display", "error", "from"] }
hyper = "0.14"
s3-server = "0.2"
secrecy = "0.8"
Expand Down
15 changes: 5 additions & 10 deletions api/s3/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
//! S3 HTTP API implementation of Baza.

// TODO: Remove on next `derive_more` major version upgrade.
#![allow(clippy::uninlined_format_args)]

use std::{
convert::Infallible,
fmt, io,
net::{TcpListener, ToSocketAddrs},
};

use derive_more::{Display, Error, From};
use hyper::{server::Server, service::make_service_fn};
use s3_server::{
dto,
Expand All @@ -19,11 +17,8 @@ use secrecy::{ExposeSecret as _, SecretString};
use tokio_util::{compat::FuturesAsyncReadCompatExt as _, io::ReaderStream};

use baza::{
async_trait,
derive_more::{Display, Error, From},
futures::future,
tracing, CreateFile, CreateSymlink, Exec, GetFile, ReadOnlyFile,
RelativePath,
async_trait, futures::future, tracing, CreateFile, CreateSymlink, Exec,
GetFile, ReadOnlyFile, RelativePath,
};

/// [`dto::PutObjectRequest::metadata`] key where [`CreateSymlink::src`] is
Expand Down Expand Up @@ -67,11 +62,11 @@ where
#[derive(Debug, Display, Error, From)]
pub enum RunHttpServerError {
/// Failed to bind address.
#[display(fmt = "Failed to bind address: {}", _0)]
#[display("Failed to bind address: {_0}")]
BindAddress(io::Error),

/// [`hyper`] server failure.
#[display(fmt = "Hyper server failed: {}", _0)]
#[display("Hyper server failed: {_0}")]
Hyper(hyper::Error),
}

Expand Down
2 changes: 1 addition & 1 deletion e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "baza-e2e"
version = "0.0.0"
edition = "2021"
rust-version = "1.70"
rust-version = "1.75"
description = "E2E (end-to-end) tests of this project."
authors = ["Instrumentisto Team <[email protected]>"]
license = "BlueOak-1.0.0"
Expand Down
4 changes: 2 additions & 2 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "baza-lib"
version = "0.0.0"
edition = "2021"
rust-version = "1.70"
rust-version = "1.75"
description = "Actual Baza implementation as library."
authors = ["Instrumentisto Team <[email protected]>"]
license = "BlueOak-1.0.0"
Expand All @@ -11,7 +11,7 @@ publish = false
[dependencies]
async-fs = "2.1"
async-trait = "0.1"
derive_more = "0.99"
derive_more = { version = "1", features = ["display", "error"] }
futures = "0.3"
tracerr = "0.3"
tracing = "0.1"
Expand Down
3 changes: 1 addition & 2 deletions lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use tracerr::Traced;
use uuid::Uuid;

pub use async_trait::async_trait;
pub use derive_more;
pub use futures;
pub use tracing;

Expand Down Expand Up @@ -264,7 +263,7 @@ impl TryFrom<String> for RelativePath {

/// Error of parsing [`RelativePath`] from a [`String`].
#[derive(Debug, Display, Error)]
#[display(fmt = "Invalid `RelativePath` format")]
#[display("Invalid `RelativePath` format")]
pub struct InvalidRelativePathError;

#[cfg(test)]
Expand Down

0 comments on commit f0bddf3

Please sign in to comment.