Skip to content

Commit 7c6ab95

Browse files
andreeaflorescualexandruag
authored andcommitted
simplify the definition of the IdAllocator::new
There is no need to use the std::result define, as we defined a simplified one in the crate. Signed-off-by: Andreea Florescu <[email protected]>
1 parent 170eacc commit 7c6ab95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/id_allocator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl IdAllocator {
3333
/// Creates a new instance of IdAllocator that will be used to manage the
3434
/// allocation and release of ids from the interval specified by
3535
/// `range_base` and `range_end`
36-
pub fn new(range_base: u32, range_end: u32) -> std::result::Result<Self, Error> {
36+
pub fn new(range_base: u32, range_end: u32) -> Result<Self> {
3737
if range_end < range_base {
3838
return Err(Error::InvalidRange(range_base.into(), range_end.into()));
3939
}

0 commit comments

Comments
 (0)