servo/components/script_bindings
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
..
codegen script: Take away Fallible from new_resolved and new_rejected (#35473) 2025-02-15 21:29:34 +00:00
webidls script: Take away Fallible from new_resolved and new_rejected (#35473) 2025-02-15 21:29:34 +00:00
build.rs script: Move code generation and webidl files to new script_bindings crate. (#35157) 2025-01-24 20:47:43 +00:00
callback.rs Move various reflector types and traits to script_bindings (#35279) 2025-02-04 06:58:08 +00:00
Cargo.toml Move more foundational types to script_bindings (#35280) 2025-02-04 10:36:30 +00:00
conversions.rs dom: Always replace unpaired surrogates when handling page text (#35381) 2025-02-09 08:56:05 +00:00
inheritance.rs Move more foundational types to script_bindings (#35280) 2025-02-04 10:36:30 +00:00
lib.rs Move more foundational types to script_bindings (#35280) 2025-02-04 10:36:30 +00:00
reflector.rs Move various reflector types and traits to script_bindings (#35279) 2025-02-04 06:58:08 +00:00
script_runtime.rs Move more foundational types to script_bindings (#35280) 2025-02-04 10:36:30 +00:00
str.rs dom: Always replace unpaired surrogates when handling page text (#35381) 2025-02-09 08:56:05 +00:00
trace.rs bindings: Move string-related bindings code to script_bindings. (#35172) 2025-01-29 07:40:25 +00:00
utils.rs Move more foundational types to script_bindings (#35280) 2025-02-04 10:36:30 +00:00