Skip to content

Commit

Permalink
adjust for changes in git-transport
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Nov 11, 2022
1 parent 07512db commit f88569b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion git-protocol/src/fetch/handshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pub(crate) mod function {
let url = transport.to_url();
progress.set_name("authentication");
let credentials::protocol::Outcome { identity, next } =
authenticate(credentials::helper::Action::get_for_url(url))?
authenticate(credentials::helper::Action::get_for_url(url.into_owned()))?
.expect("FILL provides an identity or errors");
transport.set_identity(identity)?;
progress.step();
Expand Down
10 changes: 6 additions & 4 deletions git-protocol/src/fetch/tests/arguments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ struct Transport<T> {

#[cfg(feature = "blocking-client")]
mod impls {
use bstr::BString;
use bstr::BStr;
use git_transport::{
client,
client::{Error, MessageKind, RequestWriter, SetServiceResponse, WriteMode},
Protocol, Service,
};
use std::borrow::Cow;

use crate::fetch::tests::arguments::Transport;

Expand All @@ -36,7 +37,7 @@ mod impls {
self.inner.request(write_mode, on_into_read)
}

fn to_url(&self) -> BString {
fn to_url(&self) -> Cow<'_, BStr> {
self.inner.to_url()
}

Expand Down Expand Up @@ -70,12 +71,13 @@ mod impls {
#[cfg(feature = "async-client")]
mod impls {
use async_trait::async_trait;
use bstr::BString;
use bstr::BStr;
use git_transport::{
client,
client::{Error, MessageKind, RequestWriter, SetServiceResponse, WriteMode},
Protocol, Service,
};
use std::borrow::Cow;

use crate::fetch::tests::arguments::Transport;
impl<T: client::TransportWithoutIO + Send> client::TransportWithoutIO for Transport<T> {
Expand All @@ -87,7 +89,7 @@ mod impls {
self.inner.request(write_mode, on_into_read)
}

fn to_url(&self) -> BString {
fn to_url(&self) -> Cow<'_, BStr> {
self.inner.to_url()
}

Expand Down

0 comments on commit f88569b

Please sign in to comment.