Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: unify use Option ref #1477

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions crates/node-bindings/src/nodes/geth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,19 @@ impl GethInstance {
}

/// Returns the path to this instances' data directory
pub const fn data_dir(&self) -> &Option<PathBuf> {
&self.data_dir
pub const fn data_dir(&self) -> Option<&PathBuf> {
self.data_dir.as_ref()
}

/// Returns the genesis configuration used to configure this instance
pub const fn genesis(&self) -> &Option<Genesis> {
&self.genesis
pub const fn genesis(&self) -> Option<&Genesis> {
self.genesis.as_ref()
}

/// Returns the private key used to configure clique on this instance
#[deprecated = "clique support was removed in geth >=1.14"]
pub const fn clique_private_key(&self) -> &Option<SigningKey> {
&self.clique_private_key
pub const fn clique_private_key(&self) -> Option<&SigningKey> {
self.clique_private_key.as_ref()
}

/// Takes the stderr contained in the child process.
Expand Down
8 changes: 4 additions & 4 deletions crates/node-bindings/src/nodes/reth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ impl RethInstance {
}

/// Returns the path to this instances' data directory.
pub const fn data_dir(&self) -> &Option<PathBuf> {
&self.data_dir
pub const fn data_dir(&self) -> Option<&PathBuf> {
self.data_dir.as_ref()
}

/// Returns the genesis configuration used to configure this instance
pub const fn genesis(&self) -> &Option<Genesis> {
&self.genesis
pub const fn genesis(&self) -> Option<&Genesis> {
self.genesis.as_ref()
}

/// Takes the stdout contained in the child process.
Expand Down