You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if system.is_server(){// I know fully qualified domain name is always set for servers, just unwrap itlet fdqn = system.fdqn.unwrap();}// Later, in another file or function, configuring a different service:if system.is_server(){// I know fully qualified domain name is always set for servers, just unwrap itlet fdqn = system.fdqn.unwrap();}
This doesn't work, since the first .unwrap() consumes the Option. Option also doesn't implement .clone() so there isn't even a workaround for this. Nor can I use .as_ref() like I could in Rust.
What is the suggested solution (in 0.13 preferably)?
The text was updated successfully, but these errors were encountered:
Lets say you have something like this:
This doesn't work, since the first
.unwrap()
consumes the Option. Option also doesn't implement.clone()
so there isn't even a workaround for this. Nor can I use.as_ref()
like I could in Rust.What is the suggested solution (in 0.13 preferably)?
The text was updated successfully, but these errors were encountered: