Skip to content
Open
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions src/queryable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ pub trait Queryable: Send {
params: P,
) -> BoxFuture<'s, QueryResult<'a, 'static, BinaryProtocol>>
where
Q: StatementLike + 'a,
Q: StatementLike + 's,
P: Into<Params>;

/// Performs the given query and collects the first result set.
Expand Down Expand Up @@ -443,7 +443,7 @@ pub trait Queryable: Send {
) -> BoxFuture<'s, ResultSetStream<'a, 'a, 'static, T, BinaryProtocol>>
where
T: Unpin + FromRow + Send + 'static,
Q: StatementLike + 'a,
Q: StatementLike + 's,
P: Into<Params> + Send + 's,
{
async move {
Expand Down Expand Up @@ -502,7 +502,7 @@ impl Queryable for Conn {
params: P,
) -> BoxFuture<'s, QueryResult<'a, 'static, BinaryProtocol>>
where
Q: StatementLike + 'a,
Q: StatementLike + 's,
P: Into<Params>,
{
let params = params.into();
Expand Down Expand Up @@ -567,7 +567,7 @@ impl Queryable for Transaction<'_> {
params: P,
) -> BoxFuture<'s, QueryResult<'a, 'static, BinaryProtocol>>
where
Q: StatementLike + 'a,
Q: StatementLike + 's,
P: Into<Params>,
{
self.0.as_mut().exec_iter(stmt, params)
Expand Down Expand Up @@ -618,7 +618,7 @@ impl<'c, 't: 'c> Queryable for Connection<'c, 't> {
params: P,
) -> BoxFuture<'s, QueryResult<'a, 'static, BinaryProtocol>>
where
Q: StatementLike + 'a,
Q: StatementLike + 's,
P: Into<Params>,
{
self.as_mut().exec_iter(stmt, params)
Expand Down
Loading