Skip to content

Commit 868d99f

Browse files
committed
Change connected() to take &self instead of &mut self
Signed-off-by: cuishuang <imcusg@gmail.com>
1 parent e9854c6 commit 868d99f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/remote.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ impl<'repo> Remote<'repo> {
225225
}
226226

227227
/// Check whether the remote is connected
228-
pub fn connected(&mut self) -> bool {
228+
pub fn connected(&self) -> bool {
229229
unsafe { raw::git_remote_connected(self.raw) == 1 }
230230
}
231231

@@ -759,7 +759,7 @@ impl<'cb> Binding for PushOptions<'cb> {
759759

760760
impl<'repo, 'connection, 'cb> RemoteConnection<'repo, 'connection, 'cb> {
761761
/// Check whether the remote is (still) connected
762-
pub fn connected(&mut self) -> bool {
762+
pub fn connected(&self) -> bool {
763763
self.remote.connected()
764764
}
765765

0 commit comments

Comments
 (0)