Removed unwrap() on getters.

This commit is contained in:
Mauro D
2022-07-06 16:49:35 +00:00
parent adf6176a8f
commit a6d1dbeae9
13 changed files with 97 additions and 59 deletions

View File

@@ -5,8 +5,8 @@ use crate::{core::get::GetObject, Get, Set};
use super::{Principal, Type, ACL, DKIM};
impl Principal<Get> {
pub fn id(&self) -> &str {
self.id.as_ref().unwrap()
pub fn id(&self) -> Option<&str> {
self.id.as_deref()
}
pub fn unwrap_id(self) -> String {