mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
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:
parent
281d942981
commit
cf59aa1948
2 changed files with 29 additions and 10 deletions
|
@ -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(),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue