These are all good questions! You are correct about the reference to the code that you will be modifying. Servo imports the types from the devices crate in this code: https://github.com/servo/servo/blob/059ac12c00c4cfac4133b23fc3d81e71b90eb8e2/components/bluetooth/lib.rs#L19-L20 .. That means that references to BluetoothAdapter will need to be adapted (ha!) to accommodate your changes to that crate; you will want to be familiar with how Rust code uses traits for that: https://doc.rust-lang.org/book/ch17-02-trait-objects.html

I can't think of any similar changes you could use as a reference off the top of my head, unfortunately.

As for the the behaviour of the code, you can rely on `./mach test-wpt tests/wpt/mozilla/tests/bluetooth/` to run the existing bluetooth automated tests. Ideally there should be no difference in output after your changes.

Cheers,
Josh

On 3/23/19 10:53 AM, Niveditha Shankar wrote:
I have a few more doubts regarding the output:

1) What is the existing output for the code we have to work on?
2) Which file should we execute to obtain the same?

As we are doing only refactoring, I am guessing there would not be any
change in the output.
Wanted to know against what we should check our code with.

Thank you!
Niveditha Shankar

On Sat, Mar 23, 2019 at 12:34 AM Niveditha Shankar <nshan...@ncsu.edu> wrote:

Hello
Just wanted to make sure that we are working with the correct part of the code,
To convert the  BluetoothAdapter from enum to trait, are we right in
assuming that we will be working with the following, Line 93-106 in
https://github.com/servo/devices/blob/master/src/bluetooth.rs.

Could you brief us more on this - "Modify Servo's integration to use
this new trait"

And also, is there any other similar implementation for this
conversion that we can refer to?


Thank you

Niveditha Shankar
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to