Skip to content

Commit 5d37c18

Browse files
committed
lib: use flags_maildir_file
It's a better name. And fix some typos.
1 parent 2d20074 commit 5d37c18

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

lib/message/mu-flags.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ test_flags_from_delta_expr()
138138
"-S", Flags::Seen).value() ==
139139
Flags::Unread);
140140

141-
142141
static_assert(flags_from_delta_expr("+R+P-F", Flags::Seen).value() ==
143142
(Flags::Seen|Flags::Passed|Flags::Replied));
144143
/* '-B' is invalid */

lib/message/mu-flags.hh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ constexpr std::array<MessageFlagInfo, 14> AllMessageFlagInfos = {{
144144
MessageFlagInfo{Flags::HasAttachment,'a', "attach", MessageFlagCategory::Content,
145145
"Has at least one attachment"
146146
},
147-
148147
MessageFlagInfo{Flags::Unread, 'u', "unread", MessageFlagCategory::Pseudo,
149148
"New or not seen message"
150149
},
@@ -289,9 +288,9 @@ flags_from_absolute_expr(std::string_view expr, bool ignore_invalid = false)
289288
* @param expr delta expression
290289
* @param flags existing flags
291290
* @param ignore_invalid if @true, ignore invalid flags, otherwise return
292-
* nullopt if an invalid flag is encountered
291+
* Nothing if an invalid flag is encountered
293292
*
294-
* @return new flags, or nullopt in case of error
293+
* @return new flags, or Nothing in case of error
295294
*/
296295
constexpr Option<Flags>
297296
flags_from_delta_expr(std::string_view expr, Flags flags,
@@ -317,7 +316,6 @@ flags_from_delta_expr(std::string_view expr, Flags flags,
317316
}
318317

319318
return imply_unread(flags);
320-
321319
}
322320

323321
/**
@@ -366,7 +364,7 @@ flags_filter(Flags flags, MessageFlagCategory cat)
366364
* @return filtered flags
367365
*/
368366
constexpr Flags
369-
flags_mail_dir_file(Flags flags)
367+
flags_maildir_file(Flags flags)
370368
{
371369
for (auto&& info : AllMessageFlagInfos)
372370
if (info.category != MessageFlagCategory::Maildir &&

lib/mu-maildir.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ Mu::maildir_determine_target(const std::string& old_path,
421421
Flags newflags,
422422
bool new_name)
423423
{
424-
newflags = flags_mail_dir_file(newflags); // filter out irrelevant flags.
424+
newflags = flags_maildir_file(newflags); // filter out irrelevant flags.
425425

426426
/* sanity checks */
427427
if (const auto checked{check_determine_target_params(

lib/mu-maildir.hh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,16 @@ Result<void> maildir_move_message(const std::string& oldpath,
9494
*
9595
* @param old_path an absolute file system path to an existing message in an
9696
* actual maildir
97-
* @param root_maildir_path the absolete file system path under which
97+
* @param root_maildir_path the absolute file system path under which
9898
* all maildirs live.
9999
* @param target_maildir the target maildir; note that this the base-level
100100
* Maildir, ie. /home/user/Maildir/archive, and must _not_ include the
101101
* 'cur' or 'new' part. Note that the target maildir must be on the
102102
* same filesystem. Can be empty if the message should not be moved to
103103
* a different maildir; note that this may still involve a
104104
* move to another directory (say, from new/ to cur/)
105-
* @param flags to set for the target (influences the filename, path). Any none-Maildir/File
106-
* flags are ignored.
105+
* @param flags to set for the target (influences the filename, path).
106+
* Any non-Maildir/File flags are ignored.
107107
* @param new_name whether to change the basename of the file
108108
*
109109
* @return Full path name of the target file or an Error

0 commit comments

Comments
 (0)