File tree Expand file tree Collapse file tree 3 files changed +3
-10
lines changed Expand file tree Collapse file tree 3 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ use std::slice;
12
12
use array:: { Array , ArrayExt } ;
13
13
use array:: Index ;
14
14
use CapacityError ;
15
- use errors:: PubCrateNew ;
16
15
use odds:: char:: encode_utf8;
17
16
18
17
#[ cfg( feature="serde-1" ) ]
Original file line number Diff line number Diff line change @@ -10,19 +10,14 @@ pub struct CapacityError<T = ()> {
10
10
element : T ,
11
11
}
12
12
13
- pub trait PubCrateNew < T > {
14
- fn new ( elt : T ) -> Self ;
15
- }
16
-
17
- impl < T > PubCrateNew < T > for CapacityError < T > {
18
- fn new ( element : T ) -> CapacityError < T > {
13
+ impl < T > CapacityError < T > {
14
+ /// Create a new `CapacityError` from `element`.
15
+ pub fn new ( element : T ) -> CapacityError < T > {
19
16
CapacityError {
20
17
element : element,
21
18
}
22
19
}
23
- }
24
20
25
- impl < T > CapacityError < T > {
26
21
/// Extract the overflowing element
27
22
pub fn element ( self ) -> T {
28
23
self . element
Original file line number Diff line number Diff line change @@ -69,7 +69,6 @@ pub use array::Array;
69
69
pub use range:: RangeArgument ;
70
70
use array:: Index ;
71
71
pub use array_string:: ArrayString ;
72
- use errors:: PubCrateNew ;
73
72
pub use errors:: CapacityError ;
74
73
75
74
You can’t perform that action at this time.
0 commit comments