Things we did:
- Body
- Started refactoring consume_body based on feedback and yesterday’s planning. Created
body.rs
and pulled outconsume_body
andrun_package_data_algorithm
into it, and created aBodyTrait
. The project was oddly compiling without complaints for most of the day. I mentioned this to Jeena, who reminded me that I have to list new dom files it in dom/mod.rs……haha. :) I did, and then all my bugs were then revealed upon the next compile. :P
- Started refactoring consume_body based on feedback and yesterday’s planning. Created
- Promise in Fetch
-
net_traits
had changed! So I had to modify theprocess_response()
method to accomodate the changes. It is more secure now as it allows the fetched data to be filtered. Filter exists to protect sites from having their data stolen by other sites.
-
- Package Data Algorithm
- I implemented(though no guarantee it works )
Json()
,Blob()
, and part ofFormData()
.
- I implemented(though no guarantee it works )
Things we learned:
- Moment of Realization
- One of the reasons why I (Malisa) write code so slowly is that I feel like I need to understand every little thing about the codebase (at least, the parts I touch) prior to writing code. I’m unwilling to accept that Servo can just be MagicTM. But I think I’m starting to realize that going “down the rabbit hole” for each little detail can actually be somewhat counter-productive. Going to try to believe in magic a little more from now on.
- If an enum has a type that is a struct/enum, the match statement will need to be comprehensive to cover the struct’s fields or enum’s types. For example, say there are two enums:
This match statement won’t work!
The compiler will say that:
The correct way to write the match statement is:
Link to play-rust is here. Or even simpler:
Link to play-rust is here. There is a github issue open for rust-lang to print out more helpful hints about this matter.
TODO:
- Body
- debug and finish refactoring. Push to github and then merge with Jeena’s implementation of
Blob()
andFormData()
. Then work on Body for Request.
- debug and finish refactoring. Push to github and then merge with Jeena’s implementation of
- Test Curation
- Go through the new tests, and categorize them.
- Package Data Algorithm
- Figure out how to write
FormData()
when MIMEType is “multipart/form-data”.
- Figure out how to write