Skip to content

Commit 45e3a86

Browse files
committed
refactor: dont derive Serialize for git database/checkout
It doesn't seem that they need to derive `Serialize`. Is there any other usage I am not aware of?
1 parent adc4dbd commit 45e3a86

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/cargo/sources/git/utils.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,29 +57,24 @@ pub struct GitRemote {
5757

5858
/// A local clone of a remote repository's database. Multiple [`GitCheckout`]s
5959
/// can be cloned from a single [`GitDatabase`].
60-
#[derive(Serialize)]
6160
pub struct GitDatabase {
6261
/// The remote repository where this database is fetched from.
6362
remote: GitRemote,
6463
/// Path to the root of the underlying Git repository on the local filesystem.
6564
path: PathBuf,
6665
/// Underlying Git repository instance for this database.
67-
#[serde(skip_serializing)]
6866
repo: git2::Repository,
6967
}
7068

7169
/// A local checkout of a particular revision from a [`GitDatabase`].
72-
#[derive(Serialize)]
7370
pub struct GitCheckout<'a> {
7471
/// The git database where this checkout is cloned from.
7572
database: &'a GitDatabase,
7673
/// Path to the root of the underlying Git repository on the local filesystem.
7774
path: PathBuf,
7875
/// The git revision this checkout is for.
79-
#[serde(serialize_with = "serialize_str")]
8076
revision: git2::Oid,
8177
/// Underlying Git repository instance for this checkout.
82-
#[serde(skip_serializing)]
8378
repo: git2::Repository,
8479
}
8580

0 commit comments

Comments
 (0)