[libvirt] [PATCH Rust 4/4] libvirt-rust: use reference instead of moving

Zixing Liu posted 4 patches 5 years ago
There is a newer version of this series
[libvirt] [PATCH Rust 4/4] libvirt-rust: use reference instead of moving
Posted by Zixing Liu 5 years ago
Signed-off-by: Zixing Liu <liushuyu@aosc.io>
---
 src/domain.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/domain.rs b/src/domain.rs
index acb9e6e..4d4f593 100644
--- a/src/domain.rs
+++ b/src/domain.rs
@@ -1397,7 +1397,7 @@ impl Domain {
         }
     }
 
-    pub fn open_console(&self, name: &str, stream: Stream, flags: u32) -> Result<u32, Error> {
+    pub fn open_console(&self, name: &str, stream: &Stream, flags: u32) -> Result<u32, Error> {
         unsafe {
             let ret = virDomainOpenConsole(self.as_ptr(),
                                            string_to_c_chars!(name),
-- 
2.24.0


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH Rust 4/4] libvirt-rust: use reference instead of moving
Posted by Sahid Orentino Ferdjaoui 5 years ago
On Tue, Nov 12, 2019 at 02:44:45PM -0700, Zixing Liu wrote:
> Signed-off-by: Zixing Liu <liushuyu@aosc.io>
> ---
>  src/domain.rs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>

> 
> diff --git a/src/domain.rs b/src/domain.rs
> index acb9e6e..4d4f593 100644
> --- a/src/domain.rs
> +++ b/src/domain.rs
> @@ -1397,7 +1397,7 @@ impl Domain {
>          }
>      }
>  
> -    pub fn open_console(&self, name: &str, stream: Stream, flags: u32) -> Result<u32, Error> {
> +    pub fn open_console(&self, name: &str, stream: &Stream, flags: u32) -> Result<u32, Error> {
>          unsafe {
>              let ret = virDomainOpenConsole(self.as_ptr(),
>                                             string_to_c_chars!(name),
> -- 
> 2.24.0


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list