Skip to content

Commit

Permalink
feat: custom message field
Browse files Browse the repository at this point in the history
  • Loading branch information
yangnianbing committed Jan 14, 2024
1 parent 2d03f7e commit e0e314e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/stash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ impl<'a> StashSaveOptions<'a> {
);
opts
}

/// Customize optional `message` field
pub fn message(&mut self, message: Option<&str>) -> &mut Self {
let message = crate::opt_cstr(message).unwrap_or_default();
self.message = message;
self
}

/// Customize optional `flags` field
pub fn flags(&mut self, flags: Option<StashFlags>) -> &mut Self {
self.flags = flags;
Expand Down

0 comments on commit e0e314e

Please sign in to comment.