[omaha-client] common::App::new and related cleanups
Some suggested cleanups in earlier code that was caught in a more recent code review. A) This adds an App::new<I, V>(I, V) -> Self constructor and a similar one called ::with_fingerprint(). These use type parameters and Into<String> and Into<Version>, and as a result, allow for much tidier code when constructing an App. B) This switches a list traversal to a functional .find() call in the RequestBuilder. Which again, tidies things up. Bug: PKG-679 Test: fx run-test omaha_client_lib_tests Change-Id: If0b595355b2578be43e12722b1b9307496db91fa
Showing
- garnet/lib/rust/omaha_client/src/common/mod.rs 34 additions, 0 deletionsgarnet/lib/rust/omaha_client/src/common/mod.rs
- garnet/lib/rust/omaha_client/src/request_builder/mod.rs 9 additions, 13 deletionsgarnet/lib/rust/omaha_client/src/request_builder/mod.rs
- garnet/lib/rust/omaha_client/src/request_builder/tests.rs 24 additions, 80 deletionsgarnet/lib/rust/omaha_client/src/request_builder/tests.rs
Loading
Please register or sign in to comment