diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2020-11-19 18:55:57 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2020-11-19 19:25:53 +0300 |
commit | d56ae71e0e4f5465fa32772414ca616ec7bcf0a6 (patch) | |
tree | 51811e16173d6a14a33813f8d77caabc1b207a91 /net | |
parent | df6a229f58cd83591ed1702bd95199436644d22e (diff) |
Update for ObjectImpl::get_property() being infallible now
Diffstat (limited to 'net')
-rw-r--r-- | net/reqwest/src/reqwesthttpsrc/imp.rs | 24 | ||||
-rw-r--r-- | net/rusoto/src/aws_transcriber/imp.rs | 8 | ||||
-rw-r--r-- | net/rusoto/src/s3sink/imp.rs | 10 | ||||
-rw-r--r-- | net/rusoto/src/s3src/imp.rs | 4 |
4 files changed, 23 insertions, 23 deletions
diff --git a/net/reqwest/src/reqwesthttpsrc/imp.rs b/net/reqwest/src/reqwesthttpsrc/imp.rs index cb9ebec86..b3a47a68d 100644 --- a/net/reqwest/src/reqwesthttpsrc/imp.rs +++ b/net/reqwest/src/reqwesthttpsrc/imp.rs @@ -743,51 +743,51 @@ impl ObjectImpl for ReqwestHttpSrc { }; } - fn get_property(&self, obj: &Self::Type, id: usize) -> Result<glib::Value, ()> { + fn get_property(&self, obj: &Self::Type, id: usize) -> glib::Value { let prop = &PROPERTIES[id]; match *prop { subclass::Property("location", ..) => { let settings = self.settings.lock().unwrap(); let location = settings.location.as_ref().map(Url::to_string); - Ok(location.to_value()) + location.to_value() } subclass::Property("user-agent", ..) => { let settings = self.settings.lock().unwrap(); - Ok(settings.user_agent.to_value()) + settings.user_agent.to_value() } - subclass::Property("is-live", ..) => Ok(obj.is_live().to_value()), + subclass::Property("is-live", ..) => obj.is_live().to_value(), subclass::Property("user-id", ..) => { let settings = self.settings.lock().unwrap(); - Ok(settings.user_id.to_value()) + settings.user_id.to_value() } subclass::Property("user-pw", ..) => { let settings = self.settings.lock().unwrap(); - Ok(settings.user_pw.to_value()) + settings.user_pw.to_value() } subclass::Property("timeout", ..) => { let settings = self.settings.lock().unwrap(); - Ok(settings.timeout.to_value()) + settings.timeout.to_value() } subclass::Property("compress", ..) => { let settings = self.settings.lock().unwrap(); - Ok(settings.compress.to_value()) + settings.compress.to_value() } subclass::Property("extra-headers", ..) => { let settings = self.settings.lock().unwrap(); - Ok(settings.extra_headers.to_value()) + settings.extra_headers.to_value() } subclass::Property("cookies", ..) => { let settings = self.settings.lock().unwrap(); - Ok(settings.cookies.to_value()) + settings.cookies.to_value() } subclass::Property("iradio-mode", ..) => { let settings = self.settings.lock().unwrap(); - Ok(settings.iradio_mode.to_value()) + settings.iradio_mode.to_value() } subclass::Property("keep-alive", ..) => { let settings = self.settings.lock().unwrap(); - Ok(settings.keep_alive.to_value()) + settings.keep_alive.to_value() } _ => unimplemented!(), } diff --git a/net/rusoto/src/aws_transcriber/imp.rs b/net/rusoto/src/aws_transcriber/imp.rs index 3c95f3c73..4c85580f1 100644 --- a/net/rusoto/src/aws_transcriber/imp.rs +++ b/net/rusoto/src/aws_transcriber/imp.rs @@ -1119,21 +1119,21 @@ impl ObjectImpl for Transcriber { } } - fn get_property(&self, _obj: &Self::Type, id: usize) -> Result<glib::Value, ()> { + fn get_property(&self, _obj: &Self::Type, id: usize) -> glib::Value { let prop = &PROPERTIES[id]; match *prop { subclass::Property("language-code", ..) => { let settings = self.settings.lock().unwrap(); - Ok(settings.language_code.to_value()) + settings.language_code.to_value() } subclass::Property("latency", ..) => { let settings = self.settings.lock().unwrap(); - Ok(settings.latency_ms.to_value()) + settings.latency_ms.to_value() } subclass::Property("use-partial-results", ..) => { let settings = self.settings.lock().unwrap(); - Ok(settings.use_partial_results.to_value()) + settings.use_partial_results.to_value() } _ => unimplemented!(), } diff --git a/net/rusoto/src/s3sink/imp.rs b/net/rusoto/src/s3sink/imp.rs index 121a38589..44fe1da8a 100644 --- a/net/rusoto/src/s3sink/imp.rs +++ b/net/rusoto/src/s3sink/imp.rs @@ -446,15 +446,15 @@ impl ObjectImpl for S3Sink { } } - fn get_property(&self, _: &Self::Type, id: usize) -> Result<glib::Value, ()> { + fn get_property(&self, _: &Self::Type, id: usize) -> glib::Value { let prop = &PROPERTIES[id as usize]; let settings = self.settings.lock().unwrap(); match *prop { - subclass::Property("key", ..) => Ok(settings.key.to_value()), - subclass::Property("bucket", ..) => Ok(settings.bucket.to_value()), - subclass::Property("region", ..) => Ok(settings.region.name().to_value()), - subclass::Property("part-size", ..) => Ok(settings.buffer_size.to_value()), + subclass::Property("key", ..) => settings.key.to_value(), + subclass::Property("bucket", ..) => settings.bucket.to_value(), + subclass::Property("region", ..) => settings.region.name().to_value(), + subclass::Property("part-size", ..) => settings.buffer_size.to_value(), _ => unimplemented!(), } } diff --git a/net/rusoto/src/s3src/imp.rs b/net/rusoto/src/s3src/imp.rs index ea0eb4f6c..70cfee7a9 100644 --- a/net/rusoto/src/s3src/imp.rs +++ b/net/rusoto/src/s3src/imp.rs @@ -259,7 +259,7 @@ impl ObjectImpl for S3Src { } } - fn get_property(&self, _: &Self::Type, id: usize) -> Result<glib::Value, ()> { + fn get_property(&self, _: &Self::Type, id: usize) -> glib::Value { let prop = &PROPERTIES[id as usize]; match *prop { @@ -269,7 +269,7 @@ impl ObjectImpl for S3Src { None => "".to_string(), }; - Ok(url.to_value()) + url.to_value() } _ => unimplemented!(), } |