mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Replace uint/int by usize/isize in various places.
This commit is contained in:
parent
9c863a6bd4
commit
6d30ec77c8
14 changed files with 36 additions and 34 deletions
|
@ -81,7 +81,7 @@ impl<'a> CharacterDataMethods for JSRef<'a, CharacterData> {
|
|||
}
|
||||
|
||||
fn SubstringData(self, offset: u32, count: u32) -> Fallible<DOMString> {
|
||||
Ok(self.data.borrow()[offset as uint .. count as uint].to_owned())
|
||||
Ok(self.data.borrow()[offset as usize .. count as usize].to_owned())
|
||||
}
|
||||
|
||||
fn AppendData(self, arg: DOMString) -> ErrorResult {
|
||||
|
@ -107,9 +107,9 @@ impl<'a> CharacterDataMethods for JSRef<'a, CharacterData> {
|
|||
} else {
|
||||
count
|
||||
};
|
||||
let mut data = self.data.borrow()[..offset as uint].to_owned();
|
||||
let mut data = self.data.borrow()[..offset as usize].to_owned();
|
||||
data.push_str(arg.as_slice());
|
||||
data.push_str(&self.data.borrow()[(offset + count) as uint..]);
|
||||
data.push_str(&self.data.borrow()[(offset + count) as usize..]);
|
||||
*self.data.borrow_mut() = data;
|
||||
// FIXME: Once we have `Range`, we should implement step7 to step11
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue