Remove unused masks in permissions
@@ -207,53 +207,3 @@ where
Ok(self)
}
}
-
-impl Mask<&Permissioned<PskId>> for sizeof::Context {
- fn mask(&mut self, permission: &Permissioned<PskId>) -> Result<&mut Self> {
- match permission {
- Permissioned::Read(pskid) => {
- let oneof = Uint8::new(0);
- self.mask(oneof)?.mask(pskid)?;
- Ok(self)
- }
- _ => return Err(anyhow!("Psk's can only be used as ReadOnly Permissioned")),
- }
- }
-}
-
-impl<OS, F> Mask<&Permissioned<PskId>> for wrap::Context<OS, F>
-where
- F: PRP,
- OS: io::OStream,
-{
- fn mask(&mut self, permission: &Permissioned<PskId>) -> Result<&mut Self> {
- match permission {
- Permissioned::Read(pskid) => {
- let oneof = Uint8::new(0);
- self.mask(oneof)?.mask(pskid)?;
- Ok(self)
- }
- _ => return Err(anyhow!("Psk's can only be used as ReadOnly Permissioned")),
- }
- }
-}
-
-impl<IS, F> Mask<&mut Permissioned<PskId>> for unwrap::Context<IS, F>
-where
- F: PRP,
- IS: io::IStream,
-{
- fn mask(&mut self, permission: &mut Permissioned<PskId>) -> Result<&mut Self> {
- let mut oneof = Uint8::new(0);
- self.mask(&mut oneof)?;
- match oneof.inner() {
- 0 => {
- let mut psk_id = PskId::default();
- self.mask(&mut psk_id)?;
- *permission = Permissioned::Read(psk_id);
- }
- o => return Err(anyhow!("{} is not a valid permission option", o)),
- }
- Ok(self)
- }
-}
