[fidl] Prepare for protocol/service rename

This CL adds some #[allow(deprecated)] attributes where the
fidl::endpoints traits ProtocolMarker and DiscoverableService are used.
This is in preparation for a soft transition to rename these traits and
related types/constants.

Bug: 75869
Change-Id: I3b2f82ca5939a3e7156dc20fd63383959358be30
Reviewed-on: https://fuchsia-review.googlesource.com/c/experiences/+/559041
Reviewed-by: Ian McKellar <ianloic@google.com>
Commit-Queue: Mitchell Kember <mkember@google.com>
diff --git a/session_shells/ermine/session/src/main.rs b/session_shells/ermine/session/src/main.rs
index c01a106..c3d8bf9 100644
--- a/session_shells/ermine/session/src/main.rs
+++ b/session_shells/ermine/session/src/main.rs
@@ -11,7 +11,7 @@
 use {
     crate::element_repository::{ElementEventHandler, ElementManagerServer, ElementRepository},
     anyhow::{Context as _, Error},
-    fidl::endpoints::{ClientEnd, DiscoverableService, Proxy},
+    fidl::endpoints::{ClientEnd, Proxy},
     fidl_fuchsia_session::{
         ElementManagerMarker, ElementManagerRequestStream, GraphicalPresenterMarker,
     },
@@ -38,6 +38,10 @@
     std::sync::{Arc, Weak},
 };
 
+// TODO(fxbug.dev/75869): Remove when soft-transition is done.
+#[allow(deprecated)]
+use fidl::endpoints::DiscoverableService;
+
 enum ExposedServices {
     ElementManager(ElementManagerRequestStream),
     Presentation(PresentationRequestStream),
@@ -56,6 +60,8 @@
     let (client_chan, server_chan) = zx::Channel::create().unwrap();
 
     let mut launch_options = LaunchOptions::new();
+    // TODO(fxbug.dev/75869): Remove when soft-transition is done.
+    #[allow(deprecated)]
     launch_options.set_additional_services(
         vec![
             PresentationMarker::SERVICE_NAME.to_string(),
@@ -67,15 +73,10 @@
     // Check if shell is overridden. Otherwise use the default ermine shell.
     let shell_url = match fs::read_to_string("/config/data/shell") {
         Ok(url) => url,
-        Err(_) => "fuchsia-pkg://fuchsia.com/ermine#meta/ermine.cmx".to_string()
+        Err(_) => "fuchsia-pkg://fuchsia.com/ermine#meta/ermine.cmx".to_string(),
     };
 
-    let app = launch_with_options(
-        &launcher,
-        shell_url,
-        None,
-        launch_options,
-    )?;
+    let app = launch_with_options(&launcher, shell_url, None, launch_options)?;
 
     Ok((app, server_chan))
 }
@@ -94,7 +95,11 @@
     fs.take_and_serve_directory_handle()?;
 
     // Add services served over `server_chan`.
+    // TODO(fxbug.dev/75869): Remove when soft-transition is done.
+    #[allow(deprecated)]
     fs.add_fidl_service_at(ElementManagerMarker::SERVICE_NAME, ExposedServices::ElementManager);
+    // TODO(fxbug.dev/75869): Remove when soft-transition is done.
+    #[allow(deprecated)]
     fs.add_fidl_service_at(PresentationMarker::SERVICE_NAME, ExposedServices::Presentation);
     fs.serve_connection(server_chan).unwrap();