mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
clippy: fix result_unit_err
warnings (#31791)
* clippy: fix `result_unit_err` warnings * feat: fix result warnings in script * doc: document `generate_key` return type Co-authored-by: Martin Robinson <mrobinson@igalia.com> * feat: add back result to RangeRequestBounds::get_final Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
ea62a5e24f
commit
da696b7e57
14 changed files with 175 additions and 191 deletions
|
@ -83,7 +83,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
pub fn glplayer_channel<T>() -> Result<(GLPlayerSender<T>, GLPlayerReceiver<T>), ()>
|
||||
pub fn glplayer_channel<T>() -> Option<(GLPlayerSender<T>, GLPlayerReceiver<T>)>
|
||||
where
|
||||
T: for<'de> Deserialize<'de> + Serialize,
|
||||
{
|
||||
|
@ -91,10 +91,11 @@ where
|
|||
if true {
|
||||
ipc::glplayer_channel()
|
||||
.map(|(tx, rx)| (GLPlayerSender::Ipc(tx), GLPlayerReceiver::Ipc(rx)))
|
||||
.map_err(|_| ())
|
||||
.ok()
|
||||
} else {
|
||||
mpsc::glplayer_channel()
|
||||
.map(|(tx, rx)| (GLPlayerSender::Mpsc(tx), GLPlayerReceiver::Mpsc(rx)))
|
||||
.ok()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue