diff --git a/Cargo.toml b/Cargo.toml index b90b5021..56d40569 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,8 +68,6 @@ openssl = "0.10" pam = "0.7" pam-sys = "0.5" percent-encoding = "2.1" -pin-utils = "0.1.0" -pin-project = "1.0" regex = "1.2" rustyline = "7" serde = { version = "1.0", features = ["derive"] } diff --git a/debian/control b/debian/control index 73442a6d..02b094bd 100644 --- a/debian/control +++ b/debian/control @@ -37,8 +37,7 @@ Build-Depends: debhelper (>= 12), librust-pam-sys-0.5+default-dev, librust-pathpatterns-0.1+default-dev (>= 0.1.2-~~), librust-percent-encoding-2+default-dev (>= 2.1-~~), - librust-pin-project-1+default-dev, - librust-pin-utils-0.1+default-dev, + librust-pin-project-lite-0.2+default-dev, librust-proxmox-0.13+api-macro-dev, librust-proxmox-0.13+cli-dev, librust-proxmox-0.13+default-dev, diff --git a/pbs-client/Cargo.toml b/pbs-client/Cargo.toml index 076acfb5..965282bc 100644 --- a/pbs-client/Cargo.toml +++ b/pbs-client/Cargo.toml @@ -18,7 +18,7 @@ libc = "0.2" nix = "0.19.1" openssl = "0.10" percent-encoding = "2.1" -pin-project = "1.0" +pin-project-lite = "0.2" regex = "1.2" rustyline = "7" serde_json = "1.0" diff --git a/pbs-client/src/merge_known_chunks.rs b/pbs-client/src/merge_known_chunks.rs index ef7a8f9f..c590a05f 100644 --- a/pbs-client/src/merge_known_chunks.rs +++ b/pbs-client/src/merge_known_chunks.rs @@ -3,7 +3,7 @@ use std::task::{Context, Poll}; use anyhow::Error; use futures::{ready, Stream}; -use pin_project::pin_project; +use pin_project_lite::pin_project; use pbs_datastore::data_blob::ChunkInfo; @@ -16,11 +16,12 @@ pub trait MergeKnownChunks: Sized { fn merge_known_chunks(self) -> MergeKnownChunksQueue; } -#[pin_project] -pub struct MergeKnownChunksQueue { - #[pin] - input: S, - buffer: Option, +pin_project! { + pub struct MergeKnownChunksQueue { + #[pin] + input: S, + buffer: Option, + } } impl MergeKnownChunks for S diff --git a/pbs-client/src/vsock_client.rs b/pbs-client/src/vsock_client.rs index 3f0f3738..38fa121a 100644 --- a/pbs-client/src/vsock_client.rs +++ b/pbs-client/src/vsock_client.rs @@ -8,7 +8,7 @@ use http::{Request, Response}; use hyper::client::connect::{Connected, Connection}; use hyper::client::Client; use hyper::Body; -use pin_project::pin_project; +use pin_project_lite::pin_project; use serde_json::Value; use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt, ReadBuf}; use tokio::net::UnixStream; @@ -20,11 +20,12 @@ pub const DEFAULT_VSOCK_PORT: u16 = 807; #[derive(Clone)] struct VsockConnector; -#[pin_project] -/// Wrapper around UnixStream so we can implement hyper::client::connect::Connection -struct UnixConnection { - #[pin] - stream: UnixStream, +pin_project! { + /// Wrapper around UnixStream so we can implement hyper::client::connect::Connection + struct UnixConnection { + #[pin] + stream: UnixStream, + } } impl tower_service::Service for VsockConnector {