From 64a7187238c4f291f254bd6eb58138a3a6534898 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Mon, 4 Oct 2021 22:56:24 +0200 Subject: 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. --- ext/websocket/lib.rs | 9 --------- 1 file changed, 9 deletions(-) (limited to 'ext/websocket') diff --git a/ext/websocket/lib.rs b/ext/websocket/lib.rs index dbb88dc8d..ebb2186d0 100644 --- a/ext/websocket/lib.rs +++ b/ext/websocket/lib.rs @@ -59,15 +59,6 @@ pub trait WebSocketPermissions { /// would override previously used alias. pub struct UnsafelyIgnoreCertificateErrors(Option>); -/// For use with `op_websocket_*` when the user does not want permissions. -pub struct NoWebSocketPermissions; - -impl WebSocketPermissions for NoWebSocketPermissions { - fn check_net_url(&mut self, _url: &url::Url) -> Result<(), AnyError> { - Ok(()) - } -} - type WsStream = WebSocketStream>; pub enum WebSocketStreamType { Client { -- cgit v1.2.3