summaryrefslogtreecommitdiff
path: root/ext/net/lib.rs
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2021-10-04 22:56:24 +0200
committerGitHub <noreply@github.com>2021-10-04 22:56:24 +0200
commit64a7187238c4f291f254bd6eb58138a3a6534898 (patch)
treef1d552ffdfab2324e818589b5d357a674dd22a2c /ext/net/lib.rs
parentc6ae41fd8701b0fc5735ae4a6fa288f5cb35f03a (diff)
chore: remove No*Permissions structs (#12316)
These are confusing. They say they are "for users that don't care about permissions", but that isn't correct. `NoTimersPermissions` disables permissions instead of enabling them. I would argue that implementors should decide what permissions they want themselves, and not take our opinionated permissions struct.
Diffstat (limited to 'ext/net/lib.rs')
-rw-r--r--ext/net/lib.rs20
1 files changed, 0 insertions, 20 deletions
diff --git a/ext/net/lib.rs b/ext/net/lib.rs
index 8909c6f40..ad14c15d8 100644
--- a/ext/net/lib.rs
+++ b/ext/net/lib.rs
@@ -26,26 +26,6 @@ pub trait NetPermissions {
fn check_write(&mut self, _p: &Path) -> Result<(), AnyError>;
}
-/// For use with this crate when the user does not want permission checks.
-pub struct NoNetPermissions;
-
-impl NetPermissions for NoNetPermissions {
- fn check_net<T: AsRef<str>>(
- &mut self,
- _host: &(T, Option<u16>),
- ) -> Result<(), AnyError> {
- Ok(())
- }
-
- fn check_read(&mut self, _p: &Path) -> Result<(), AnyError> {
- Ok(())
- }
-
- fn check_write(&mut self, _p: &Path) -> Result<(), AnyError> {
- Ok(())
- }
-}
-
/// `UnstableChecker` is a struct so it can be placed inside `GothamState`;
/// using type alias for a bool could work, but there's a high chance
/// that there might be another type alias pointing to a bool, which