Skip to content

Commit

Permalink
Update async-memcached to latest version and fix deadpool-memcached
Browse files Browse the repository at this point in the history
  • Loading branch information
bikeshedder committed Nov 19, 2024
1 parent 9862d3f commit c64504e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
4 changes: 3 additions & 1 deletion memcached/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Update `async-memcached` to version `0.4`

## [0.3.2] - 2024-05-04

- Update `deadpool` dependency to version `0.12`
Expand Down Expand Up @@ -44,4 +46,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[0.3.0]: https://github.com/bikeshedder/deadpool/compare/deadpool-memcached-v0.2.0...deadpool-memcached-v0.3.0
[0.2.0]: https://github.com/bikeshedder/deadpool/compare/deadpool-memcached-v0.1.2...deadpool-memcached-v0.2.0
[0.1.2]: https://github.com/bikeshedder/deadpool/compare/deadpool-memcached-v0.1.0...deadpool-memcached-v0.1.2
[0.1.0]: https://github.com/bikeshedder/deadpool/deadpool-memcached-v0.1.0
[0.1.0]: https://github.com/bikeshedder/deadpool/deadpool-memcached-v0.1.0
5 changes: 4 additions & 1 deletion memcached/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ default = ["tcp"]
tcp = ["async-memcached/tcp"]

[dependencies]
async-memcached = { version = "0.1", default-features = false }
async-memcached = { version = "0.4", default-features = false }
deadpool = { path = "../", version = "0.12.0", default-features = false, features = [
"managed",
] }
Expand All @@ -32,5 +32,8 @@ deadpool = { path = "../", version = "0.12.0", default-features = false, feature
# again.
tokio = { version = "1.0", default-features = false, features = ["net"] }

[dev-dependencies]
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }

[package.metadata.cargo-machete]
ignored = ["tokio"]
12 changes: 9 additions & 3 deletions memcached/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ type RecycleResult = deadpool::managed::RecycleResult<Error>;
type ConfigError = Infallible;

pub use deadpool::managed::reexports::*;
deadpool::managed_reexports!("memcached", Manager, Client, Error, ConfigError);
deadpool::managed_reexports!(
"memcached",
Manager,
deadpool::managed::Object<Manager>,
Error,
ConfigError
);

/// The manager for creating and recyling memcache connections
pub struct Manager {
Expand All @@ -26,8 +32,8 @@ pub struct Manager {

impl Manager {
/// Create a new manager for the given address.
pub fn new(addr: String) -> Self {
Self { addr }
pub fn new(addr: impl Into<String>) -> Self {
Self { addr: addr.into() }
}
}

Expand Down

0 comments on commit c64504e

Please sign in to comment.