servo/components/script_bindings/codegen
Kingsley Yung b4f48c561b
script: Take away Fallible from new_resolved and new_rejected (#35473)
* script: Take away Fallible from new_resolved and new_rejected

Both Promise::new_resolved and new_rejected only return `Ok`. We don't
need them to be fallible. Simply return `Rc<Promise>`, instead of
`Fallible<Rc<Promise>>`. Also, clean up relevant code.

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>

* script: pull_algorithm becomes infallible

The method pull_algorithm only returns `Some(Ok(_))`, which means it is
infallible. Clean up the returned type.

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>

* script: generic_initialize becomes infallible

The method generic_initialize only returns `Ok(())`, which means it is
infallible. Clean up the returned type.

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-02-15 21:29:34 +00:00
..
api.html.template script: Move code generation and webidl files to new script_bindings crate. (#35157) 2025-01-24 20:47:43 +00:00
apis.html.template script: Move code generation and webidl files to new script_bindings crate. (#35157) 2025-01-24 20:47:43 +00:00
Bindings.conf dom: IntersectionObserver initialization (#35314) 2025-02-13 07:47:29 +00:00
CodegenRust.py script: Take away Fallible from new_resolved and new_rejected (#35473) 2025-02-15 21:29:34 +00:00
Configuration.py Make generated bindings generic over DOM types (#35169) 2025-01-25 05:08:49 +00:00
interface.html.template script: Move code generation and webidl files to new script_bindings crate. (#35157) 2025-01-24 20:47:43 +00:00
property.html.template script: Move code generation and webidl files to new script_bindings crate. (#35157) 2025-01-24 20:47:43 +00:00
run.py Move more foundational types to script_bindings (#35280) 2025-02-04 10:36:30 +00:00