summaryrefslogtreecommitdiffstats
path: root/vendor/gix-transport/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gix-transport/src/lib.rs')
-rw-r--r--vendor/gix-transport/src/lib.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/vendor/gix-transport/src/lib.rs b/vendor/gix-transport/src/lib.rs
index ca02b3b59..96e03a0e8 100644
--- a/vendor/gix-transport/src/lib.rs
+++ b/vendor/gix-transport/src/lib.rs
@@ -19,26 +19,21 @@ pub use futures_io;
pub use gix_packetline as packetline;
/// The version of the way client and server communicate.
-#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
-#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
+#[derive(Default, PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
+#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(missing_docs)]
pub enum Protocol {
/// Version 1 was the first one conceived, is stateful, and our implementation was seen to cause deadlocks. Prefer V2
V1 = 1,
/// A command-based and stateless protocol with clear semantics, and the one to use assuming the server isn't very old.
/// This is the default.
+ #[default]
V2 = 2,
}
-impl Default for Protocol {
- fn default() -> Self {
- Protocol::V2
- }
-}
-
/// The kind of service to invoke on the client or the server side.
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
-#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
+#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Service {
/// The service sending packs from a server to the client. Used for fetching pack data.
UploadPack,