From ebc4e51fe3b1e5bc61dc99da25a22d2e2277ffc6 Mon Sep 17 00:00:00 2001 From: acdenisSK Date: Tue, 11 Jul 2017 22:13:57 +0200 Subject: Remove the deprecated functions It's already been enough time for people to migrate --- src/http/mod.rs | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/http') diff --git a/src/http/mod.rs b/src/http/mod.rs index 382f264..781e64a 100644 --- a/src/http/mod.rs +++ b/src/http/mod.rs @@ -1397,24 +1397,6 @@ pub fn remove_group_recipient(group_id: u64, user_id: u64) -> Result<()> { user_id)) } -/// Sends a file to a channel. -/// -/// # Errors -/// -/// Returns an -/// [`HttpError::InvalidRequest(PayloadTooLarge)`][`HttpError::InvalidRequest`] -/// if the file is too large to send. -/// -/// [`HttpError::InvalidRequest`]: enum.HttpError.html#variant.InvalidRequest -#[deprecated(since="0.2.0", note="Please use `send_files` instead.")] -pub fn send_file(channel_id: u64, mut file: R, filename: &str, map: JsonMap) - -> Result { - let mut bytes = vec![]; - file.read_to_end(&mut bytes)?; - - send_files(channel_id, vec![AttachmentType::Bytes((&bytes, filename))], map) -} - /// Sends file(s) to a channel. /// /// # Errors -- cgit v1.2.3