Skip to content

Commit

Permalink
Replace typeString with type_string.
Browse files Browse the repository at this point in the history
  • Loading branch information
bubbles231 committed Sep 18, 2016
1 parent 5ce3510 commit e7ffbf8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions components/script/dom/blob.rs
Expand Up @@ -73,7 +73,7 @@ pub struct Blob {
#[ignore_heap_size_of = "No clear owner"]
blob_impl: DOMRefCell<BlobImpl>,
/// content-type string
typeString: String,
type_string: String,
isClosed_: Cell<bool>,
}

Expand All @@ -85,13 +85,13 @@ impl Blob {
}

#[allow(unrooted_must_root)]
pub fn new_inherited(blob_impl: BlobImpl, typeString: String) -> Blob {
pub fn new_inherited(blob_impl: BlobImpl, type_string: String) -> Blob {
Blob {
reflector_: Reflector::new(),
blob_impl: DOMRefCell::new(blob_impl),
// NOTE: Guarding the format correctness here,
// https://w3c.github.io/FileAPI/#dfn-type
typeString: normalize_type_string(&typeString),
type_string: normalize_type_string(&type_string),
isClosed_: Cell::new(false),
}
}
Expand Down Expand Up @@ -222,7 +222,7 @@ impl Blob {

let blob_buf = BlobBuf {
filename: None,
type_string: self.typeString.clone(),
type_string: self.type_string.clone(),
size: bytes.len() as u64,
bytes: bytes.to_vec(),
};
Expand Down Expand Up @@ -366,7 +366,7 @@ impl BlobMethods for Blob {

// https://w3c.github.io/FileAPI/#dfn-type
fn Type(&self) -> DOMString {
DOMString::from(self.typeString.clone())
DOMString::from(self.type_string.clone())
}

// https://w3c.github.io/FileAPI/#slice-method-algo
Expand Down
4 changes: 2 additions & 2 deletions components/script/dom/file.rs
Expand Up @@ -25,9 +25,9 @@ pub struct File {
impl File {
#[allow(unrooted_must_root)]
fn new_inherited(blob_impl: BlobImpl, name: DOMString,
modified: Option<i64>, typeString: &str) -> File {
modified: Option<i64>, type_string: &str) -> File {
File {
blob: Blob::new_inherited(blob_impl, typeString.to_owned()),
blob: Blob::new_inherited(blob_impl, type_string.to_owned()),
name: name,
// https://w3c.github.io/FileAPI/#dfn-lastModified
modified: match modified {
Expand Down

0 comments on commit e7ffbf8

Please sign in to comment.