Skip to content

Commit c42a6ee

Browse files
gmittertCQ Bot
authored andcommitted
[rust] Remove Dead Testing Code
The next rust roll has stricter dead code checks which pick up these structs as dead code. Bug: 342633927 Change-Id: Ic188637f3a73dee83701edf5ce8e527bb90cd32b Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1054333 Reviewed-by: Ben Keller <galbanum@google.com> Commit-Queue: Gwen Mittertreiner <gmtr@google.com> Reviewed-by: Bruno Dal Bo <brunodalbo@google.com> Reviewed-by: Casey Dahlin <sadmac@google.com> Fuchsia-Auto-Submit: Gwen Mittertreiner <gmtr@google.com>
1 parent b34cc49 commit c42a6ee

File tree

3 files changed

+0
-41
lines changed
  • src
    • connectivity/network/netstack3/src/bindings
    • developer/ffx/daemon/server/src
    • sys/pkg/bin/system-update-checker/src

3 files changed

+0
-41
lines changed

src/connectivity/network/netstack3/src/bindings/util.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,17 +1398,6 @@ mod tests {
13981398
}
13991399
}
14001400

1401-
struct EmptyFakeConversionContext;
1402-
impl ConversionContext for EmptyFakeConversionContext {
1403-
fn get_core_id(&self, _binding_id: BindingId) -> Option<DeviceId<BindingsCtx>> {
1404-
None
1405-
}
1406-
1407-
fn get_binding_id(&self, core_id: DeviceId<BindingsCtx>) -> BindingId {
1408-
core_id.bindings_id().id
1409-
}
1410-
}
1411-
14121401
fn create_addr_v4(bytes: [u8; 4]) -> (IpAddr, fidl_net::IpAddress) {
14131402
let core = IpAddr::V4(Ipv4Addr::from(bytes));
14141403
let fidl = fidl_net::IpAddress::Ipv4(fidl_net::Ipv4Address { addr: bytes });

src/developer/ffx/daemon/server/src/daemon.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -973,19 +973,6 @@ mod test {
973973
assert!(result.is_err());
974974
}
975975

976-
struct FakeConfigReader {
977-
query_expected: String,
978-
value: String,
979-
}
980-
981-
#[async_trait(?Send)]
982-
impl ConfigReader for FakeConfigReader {
983-
async fn get(&self, q: &str) -> Result<Option<String>> {
984-
assert_eq!(q, self.query_expected);
985-
Ok(Some(self.value.clone()))
986-
}
987-
}
988-
989976
#[fuchsia_async::run_singlethreaded(test)]
990977
async fn test_get_target_empty() {
991978
let tempdir = tempfile::tempdir().expect("Creating tempdir");

src/sys/pkg/bin/system-update-checker/src/apply.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -199,23 +199,6 @@ mod test_apply_system_update_impl {
199199

200200
const TEST_DEFAULT_UPDATE_URL: &str = "fuchsia-pkg://fuchsia.test/update";
201201

202-
struct DoNothingUpdateInstaller;
203-
impl UpdateInstaller for DoNothingUpdateInstaller {
204-
type UpdateAttempt =
205-
futures::stream::Once<future::Ready<Result<State, MonitorUpdateAttemptError>>>;
206-
207-
fn start_update(
208-
&mut self,
209-
_update_url: AbsolutePackageUrl,
210-
_options: Options,
211-
_reboot_controller_server_end: Option<ServerEnd<RebootControllerMarker>>,
212-
) -> BoxFuture<'_, Result<Self::UpdateAttempt, UpdateAttemptError>> {
213-
let info = UpdateInfo::builder().download_size(0).build();
214-
let state = State::Complete(UpdateInfoAndProgress::done(info));
215-
future::ok(futures::stream::once(future::ok(state))).boxed()
216-
}
217-
}
218-
219202
struct WasCalledUpdateInstaller {
220203
was_called: bool,
221204
}

0 commit comments

Comments
 (0)