Skip to content
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
2 changes: 1 addition & 1 deletion plugin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl WSLPluginV1 for Plugin {
}

impl Plugin {
fn log_os_release(&self, session: &WSLSessionInformation, distro_id: Option<&GUID>) {
fn log_os_release(&self, session: &WSLSessionInformation, distro_id: Option<GUID>) {
let args: [&str; 2] = ["/bin/cat", "/etc/os-release"];
let tcp_stream: std::result::Result<std::net::TcpStream, api::Error> = match distro_id {
Some(dist_id) => self
Expand Down
4 changes: 2 additions & 2 deletions wslplugins-rs/src/api/api_v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl ApiV1<'_> {
pub fn execute_binary_in_distribution<P: AsRef<Utf8UnixPath>>(
&self,
session: &WSLSessionInformation,
distribution_id: &GUID,
distribution_id: GUID,
path: P,
args: &[&str],
) -> Result<TcpStream> {
Expand All @@ -235,7 +235,7 @@ impl ApiV1<'_> {
let stream = unsafe {
self.0.ExecuteBinaryInDistribution.unwrap_unchecked()(
session.id(),
distribution_id,
&distribution_id,
path_ptr,
args_ptr,
socket.as_mut_ptr(),
Expand Down
4 changes: 2 additions & 2 deletions wslplugins-rs/src/core_distribution_information.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ pub trait CoreDistributionInformation {
/// The ID is guaranteed to remain the same across reboots.
///
/// # Returns
/// A reference to the [GUID] representing the distribution's unique identifier.
fn id(&self) -> &GUID;
/// The [GUID] representing the distribution's unique identifier.
fn id(&self) -> GUID;

/// Retrieves the name of the distribution.
///
Expand Down
4 changes: 2 additions & 2 deletions wslplugins-rs/src/distribution_information.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ impl CoreDistributionInformation for DistributionInformation<'_> {
///
/// # Returns
/// A reference to the [GUID] representing the distribution's unique identifier.
fn id(&self) -> &GUID {
&self.0.Id
fn id(&self) -> GUID {
self.0.Id
}

/// Retrieves the name of the distribution.
Expand Down
4 changes: 2 additions & 2 deletions wslplugins-rs/src/offline_distribution_information.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ impl<'a> OfflineDistributionInformation<'a> {

impl CoreDistributionInformation for OfflineDistributionInformation<'_> {
/// Retrieves the [GUID] of the offline distribution.
fn id(&self) -> &GUID {
&self.0.Id
fn id(&self) -> GUID {
self.0.Id
}

/// Retrieves the name of the offline distribution as an [OsString].
Expand Down