Skip to content

Commit 18d869e

Browse files
committed
more warning avoidance
1 parent e9b0863 commit 18d869e

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed

capnp-rpc/src/rpc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ use std::collections::binary_heap::BinaryHeap;
3838
use std::collections::hash_map::HashMap;
3939
use std::mem;
4040
use std::rc::{Rc, Weak};
41-
use std::vec::Vec;
4241

4342
use crate::attach::Attach;
4443
use crate::local::ResultsDoneHook;

capnp/src/private/capability.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
#![cfg(feature = "alloc")]
2323
use alloc::boxed::Box;
24-
use alloc::vec::Vec;
2524

2625
use crate::any_pointer;
2726
use crate::capability::{Params, Promise, RemotePromise, Request, Results};
@@ -137,7 +136,7 @@ pub trait PipelineHook {
137136

138137
/// Version of get_pipelined_cap() passing the array by move. May avoid a copy in some cases.
139138
/// Default implementation just calls the other version.
140-
fn get_pipelined_cap_move(&self, ops: Vec<PipelineOp>) -> Box<dyn ClientHook> {
139+
fn get_pipelined_cap_move(&self, ops: alloc::vec::Vec<PipelineOp>) -> Box<dyn ClientHook> {
141140
self.get_pipelined_cap(&ops)
142141
}
143142
}

capnp/src/serialize.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ pub use no_alloc_buffer_segments::{NoAllocBufferSegments, NoAllocSliceSegments};
2929
use crate::io::{Read, Write};
3030
#[cfg(feature = "alloc")]
3131
use alloc::vec::Vec;
32-
#[cfg(feature = "alloc")]
33-
use core::convert::TryInto;
34-
#[cfg(feature = "alloc")]
35-
use core::ops::Deref;
3632

3733
use crate::message;
3834
use crate::private::units::BYTES_PER_WORD;
@@ -113,7 +109,7 @@ pub struct BufferSegments<T> {
113109
}
114110

115111
#[cfg(feature = "alloc")]
116-
impl<T: Deref<Target = [u8]>> BufferSegments<T> {
112+
impl<T: core::ops::Deref<Target = [u8]>> BufferSegments<T> {
117113
/// Reads a serialized message (including a segment table) from a buffer and takes ownership, without copying.
118114
/// The buffer is allowed to be longer than the message. Provide this to `Reader::new` with options that make
119115
/// sense for your use case. Very long lived mmaps may need unlimited traversal limit.
@@ -143,7 +139,7 @@ impl<T: Deref<Target = [u8]>> BufferSegments<T> {
143139
}
144140

145141
#[cfg(feature = "alloc")]
146-
impl<T: Deref<Target = [u8]>> message::ReaderSegments for BufferSegments<T> {
142+
impl<T: core::ops::Deref<Target = [u8]>> message::ReaderSegments for BufferSegments<T> {
147143
fn get_segment(&self, id: u32) -> Option<&[u8]> {
148144
if id < self.segment_indices.len() as u32 {
149145
let (a, b) = self.segment_indices[id as usize];

capnpc/src/codegen.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use std::collections;
2323
use std::collections::{HashMap, HashSet};
2424
use std::path::{Path, PathBuf};
2525

26-
use capnp;
2726
use capnp::schema_capnp;
2827
use capnp::Error;
2928

0 commit comments

Comments
 (0)