mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Clean up the cast calls
This commit is contained in:
parent
13ea3ac413
commit
68014af78e
66 changed files with 412 additions and 718 deletions
|
@ -116,7 +116,7 @@ impl FormDataMethods for FormData {
|
|||
impl FormData {
|
||||
fn get_file_from_blob(&self, value: &Blob, filename: Option<DOMString>) -> Root<File> {
|
||||
let global = self.global.root();
|
||||
let f: Option<&File> = value.downcast::<File>();
|
||||
let f = value.downcast::<File>();
|
||||
let name = filename.unwrap_or(f.map(|inner| inner.name().clone()).unwrap_or("blob".to_owned()));
|
||||
File::new(global.r(), value, name)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue