From 220df7b0af3b565bb11e1eabace2e434d5629216 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Tue, 23 Jun 2020 09:17:39 +0100 Subject: [PATCH] gio: Make the IOStreamAsyncReadWrite constructor private Ensuring this struct can only be created internally is important, ensuring only one reference of GIOStream is tracked. --- src/gio.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gio.rs b/src/gio.rs index 1930faa..d8ab9db 100644 --- a/src/gio.rs +++ b/src/gio.rs @@ -73,7 +73,7 @@ unsafe impl> Send for IOStreamAsyncReadWrite {} impl> IOStreamAsyncReadWrite { /// Create a new `gio::IOStream` adapter - pub fn new(stream: T) -> Result, T> { + fn new(stream: T) -> Result, T> { let write = stream .get_output_stream() .and_then(|s| s.dynamic_cast::().ok())