mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
Auto merge of #12258 - izgzhen:remove-data-slice, r=Manishearth
Remove DataSlice, fix #12249 r? @Manishearth --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #12249 <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12258) <!-- Reviewable:end -->
This commit is contained in:
commit
87c7772527
12 changed files with 61 additions and 163 deletions
|
@ -324,9 +324,9 @@ impl HTMLFormElement {
|
|||
content_disposition,
|
||||
content_type));
|
||||
|
||||
let slice = f.upcast::<Blob>().get_slice_or_empty();
|
||||
let bytes = &f.upcast::<Blob>().get_bytes().unwrap_or(vec![])[..];
|
||||
|
||||
let decoded = encoding.decode(&slice.get_bytes(), DecoderTrap::Replace)
|
||||
let decoded = encoding.decode(bytes, DecoderTrap::Replace)
|
||||
.expect("Invalid encoding in file");
|
||||
result.push_str(&decoded);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue