fix: width reader (#135)

main
bokuweb 2020-09-03 11:40:57 +09:00 committed by GitHub
parent 30c514fe18
commit 902adfe0ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ pub fn read_width(attrs: &[OwnedAttribute]) -> Result<(isize, WidthType), Reader
if local_name == "type" { if local_name == "type" {
width_type = WidthType::from_str(&a.value)?; width_type = WidthType::from_str(&a.value)?;
} else if local_name == "w" { } else if local_name == "w" {
w = isize::from_str(&a.value)?; w = f64::from_str(&a.value).expect("should read width.") as isize;
} }
} }
Ok((w, width_type)) Ok((w, width_type))