Add comment to clarify unwrap
This commit is contained in:
parent
a439397c62
commit
f5eaa591cb
1 changed files with 4 additions and 0 deletions
|
@ -199,11 +199,15 @@ impl CardClient for ScdClient {
|
||||||
|
|
||||||
let hex = hex::encode(cmd);
|
let hex = hex::encode(cmd);
|
||||||
|
|
||||||
|
// (Unwrap is ok here, not having a card_caps is fine)
|
||||||
let ext = if self.card_caps.is_some()
|
let ext = if self.card_caps.is_some()
|
||||||
&& self.card_caps.unwrap().get_ext_support()
|
&& self.card_caps.unwrap().get_ext_support()
|
||||||
{
|
{
|
||||||
|
// If we know about card_caps, and can do extended length we
|
||||||
|
// set "exlen" accordingly ...
|
||||||
format!("--exlen={} ", self.card_caps.unwrap().get_max_rsp_bytes())
|
format!("--exlen={} ", self.card_caps.unwrap().get_max_rsp_bytes())
|
||||||
} else {
|
} else {
|
||||||
|
// ... otherwise don't send "exlen" to scdaemon
|
||||||
"".to_string()
|
"".to_string()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue