Adjust to changed extended_capabilities types.

This commit is contained in:
Heiko Schaefer 2021-09-16 02:38:25 +02:00
parent e1af08646a
commit 5e92f4ee25

View file

@ -334,7 +334,13 @@ impl Admin<'_> {
// Check for max len // Check for max len
let ec = self.oc.extended_capabilities()?; let ec = self.oc.extended_capabilities()?;
if url.len() < ec.max_len_special_do() as usize { if ec.max_len_special_do() == None
|| url.len() <= ec.max_len_special_do().unwrap() as usize
{
// If we don't know the max length for URL ("special DO"),
// or if it's within the acceptable length:
// send the url update to the card.
self.oc.card_app.set_url(url) self.oc.card_app.set_url(url)
} else { } else {
Err(anyhow!("URL too long").into()) Err(anyhow!("URL too long").into())