1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 18:37:41 +02:00

websockets text() is more generic

This commit is contained in:
Nikolay Kim
2018-03-04 10:18:42 -08:00
parent f673dba759
commit 631fe72a46
3 changed files with 14 additions and 14 deletions

View File

@ -489,7 +489,7 @@ impl ClientWriter {
/// Send text frame
#[inline]
pub fn text<T: Into<String>>(&mut self, text: T) {
pub fn text<T: Into<Binary>>(&mut self, text: T) {
self.write(Frame::message(text.into(), OpCode::Text, true, true));
}

View File

@ -132,7 +132,7 @@ impl<A, S> WebsocketContext<A, S> where A: Actor<Context=Self> {
/// Send text frame
#[inline]
pub fn text<T: Into<String>>(&mut self, text: T) {
pub fn text<T: Into<Binary>>(&mut self, text: T) {
self.write(Frame::message(text.into(), OpCode::Text, true, false));
}