Return Result from ProtocolRegistry::register() (#36688)

Instead of returning true / false it's better to return a Result (even
if we continue ignoring possible error).

Testing: Doesn't change any behavior

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2025-04-25 12:02:46 +02:00 committed by GitHub
parent 281d942981
commit cf59aa1948
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 29 additions and 10 deletions

View file

@ -122,12 +122,13 @@ impl App {
}
let mut protocol_registry = ProtocolRegistry::default();
protocol_registry.register(
let _ = protocol_registry.register(
"urlinfo",
protocols::urlinfo::UrlInfoProtocolHander::default(),
);
protocol_registry.register("servo", protocols::servo::ServoProtocolHandler::default());
protocol_registry.register(
let _ =
protocol_registry.register("servo", protocols::servo::ServoProtocolHandler::default());
let _ = protocol_registry.register(
"resource",
protocols::resource::ResourceProtocolHandler::default(),
);