tungstenite-rs icon indicating copy to clipboard operation
tungstenite-rs copied to clipboard

`Message::{into_text,to_text}` could use a more specific error type

Open wackbyte opened this issue 6 months ago • 0 comments

The into_text and to_text methods on Message currently return a Result with tungstenite's error type even though the only error they can produce is a UTF-8 error. I suggest that they use FromUtf8Error and Utf8Error like Frame's into_string and to_text methods.

(Also, Message::into_text and Frame::into_string are named inconsistently...)

wackbyte avatar Aug 19 '24 21:08 wackbyte