Skip to content

Commit

Permalink
Make Pool implement Default. (#317)
Browse files Browse the repository at this point in the history
A `Pool` can reasonably default to an empty set.
  • Loading branch information
sunfishcode authored May 11, 2023
1 parent b694c27 commit d243284
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cap-async-std/src/net/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use cap_primitives::{ipnet, AmbientAuthority};
///
/// This does not directly correspond to anything in `async_std`, however its
/// methods correspond to the several functions in [`async_std::net`].
#[derive(Clone)]
#[derive(Clone, Default)]
pub struct Pool {
cap: cap_primitives::net::Pool,
}
Expand Down
2 changes: 1 addition & 1 deletion cap-primitives/src/net/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl IpGrant {
///
/// This is presently a very simple concept, though it could grow in
/// sophistication in the future.
#[derive(Clone)]
#[derive(Clone, Default)]
pub struct Pool {
// TODO: when compiling for WASI, use WASI-specific handle instead
grants: Vec<IpGrant>,
Expand Down
2 changes: 1 addition & 1 deletion cap-std/src/net/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{io, net};
///
/// This does not directly correspond to anything in `std`, however its methods
/// correspond to the several functions in [`std::net`].
#[derive(Clone)]
#[derive(Clone, Default)]
pub struct Pool {
cap: cap_primitives::net::Pool,
}
Expand Down

0 comments on commit d243284

Please sign in to comment.