Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/opts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ pub enum PathOrBuf<'a> {

impl<'a> PathOrBuf<'a> {
/// Will either read data from disk or return the buffered data.
pub async fn read(&self) -> io::Result<Cow<[u8]>> {
pub async fn read(&self) -> io::Result<Cow<'_, [u8]>> {
match self {
PathOrBuf::Path(x) => tokio::fs::read(x.as_ref()).await.map(Cow::Owned),
PathOrBuf::Buf(x) => Ok(Cow::Borrowed(x.as_ref())),
Expand Down
Loading