Skip to content

Commit 9bddfaa

Browse files
committed
cargo fmt
1 parent 5f9b821 commit 9bddfaa

File tree

4 files changed

+6
-28
lines changed

4 files changed

+6
-28
lines changed

src/build.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,10 +475,7 @@ impl<'cb> CheckoutBuilder<'cb> {
475475
/// callback.
476476
///
477477
/// Defaults to none.
478-
pub fn notify_on(
479-
&mut self,
480-
notification_types: CheckoutNotificationType,
481-
) -> &mut Self {
478+
pub fn notify_on(&mut self, notification_types: CheckoutNotificationType) -> &mut Self {
482479
self.notify_flags = notification_types;
483480
self
484481
}

src/reference.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,7 @@ impl<'repo> Reference<'repo> {
339339
///
340340
/// If the force flag is not enabled, and there's already a reference with
341341
/// the given name, the renaming will fail.
342-
pub fn rename(
343-
&mut self,
344-
new_name: &str,
345-
force: bool,
346-
msg: &str,
347-
) -> Result<Self, Error> {
342+
pub fn rename(&mut self, new_name: &str, force: bool, msg: &str) -> Result<Self, Error> {
348343
let mut raw = ptr::null_mut();
349344
let new_name = CString::new(new_name)?;
350345
let msg = CString::new(msg)?;
@@ -389,11 +384,7 @@ impl<'repo> Reference<'repo> {
389384
/// The message for the reflog will be ignored if the reference does not
390385
/// belong in the standard set (HEAD, branches and remote-tracking
391386
/// branches) and it does not have a reflog.
392-
pub fn symbolic_set_target(
393-
&mut self,
394-
target: &str,
395-
reflog_msg: &str,
396-
) -> Result<Self, Error> {
387+
pub fn symbolic_set_target(&mut self, target: &str, reflog_msg: &str) -> Result<Self, Error> {
397388
let mut raw = ptr::null_mut();
398389
let target = CString::new(target)?;
399390
let msg = CString::new(reflog_msg)?;

src/repo.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,7 @@ impl Repository {
308308
/// Creates a new repository in the specified folder with the given options.
309309
///
310310
/// See `RepositoryInitOptions` struct for more information.
311-
pub fn init_opts<P: AsRef<Path>>(
312-
path: P,
313-
opts: &RepositoryInitOptions,
314-
) -> Result<Self, Error> {
311+
pub fn init_opts<P: AsRef<Path>>(path: P, opts: &RepositoryInitOptions) -> Result<Self, Error> {
315312
crate::init();
316313
// Normal file path OK (does not need Windows conversion).
317314
let path = path.as_ref().into_c_string()?;
@@ -3461,11 +3458,7 @@ impl RepositoryInitOptions {
34613458
self.flag(raw::GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE, enabled)
34623459
}
34633460

3464-
fn flag(
3465-
&mut self,
3466-
flag: raw::git_repository_init_flag_t,
3467-
on: bool,
3468-
) -> &mut Self {
3461+
fn flag(&mut self, flag: raw::git_repository_init_flag_t, on: bool) -> &mut Self {
34693462
if on {
34703463
self.flags |= flag as u32;
34713464
} else {

src/worktree.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,7 @@ impl<'a> WorktreeAddOptions<'a> {
172172
}
173173

174174
/// reference to use for the new worktree HEAD
175-
pub fn reference(
176-
&mut self,
177-
reference: Option<&'a Reference<'_>>,
178-
) -> &mut Self {
175+
pub fn reference(&mut self, reference: Option<&'a Reference<'_>>) -> &mut Self {
179176
self.raw.reference = if let Some(reference) = reference {
180177
reference.raw()
181178
} else {

0 commit comments

Comments
 (0)