~soywod

France

https://soywod.me

~soywod/pimalaya

Last active 2 days ago

~soywod/himalaya-lib

Last active 1 year, 1 month ago
View more

Recent activity

Re: [PATCH] rename new backend sync builder's to try_new 2 days ago

From Clément DOUIN to ~soywod/pimalaya

The fn returns a `Result` only because of this line:

```
let sync_dir = right_builder.account_config.get_sync_dir()?;
```

I propose instead to keep the name `new` but to pass the sync dir as
parameter, what do you think?

In both case, we introduce a breaking change.

-- 
Regards
Clément DOUIN

Re: search functionality 4 days ago

From Clément DOUIN to ~soywod/pimalaya

> Out of curiosity, is the forward functionaly similarly affected?
> 
> I keep getting:
> 
>   Error: cannot get messages: feature not available

This was a regression (see [#173]) and is already fixed on master. It
should be released soon with the beta.3, stay tuned!

---

[#173]: https://todo.sr.ht/~soywod/pimalaya/173

--

Re: search functionality 6 days ago

From Clément DOUIN to ~soywod/pimalaya

> Now that I upgraded to the v1.0.0-beta.2 from github, I can't seem to
> find the "search" functionality under any of the commands.
> 
> Am I missing something or was "search" intentionally removed?

The search command has been temporarily deactivated because it needs a
complete refactor, see [#39]. It requires quite a long work, so in order
not to block the release process I decided to release the beta without
this feature. It should come back soon, either the beta.3 or beta.4.

Sorry for the inconvenience!

[#39]: https://todo.sr.ht/~soywod/pimalaya/39

Re: [PATCH email-lib] box the envelope inside EmailSyncCacheHunk::insert 8 days ago

From Clément DOUIN to ~soywod/pimalaya

> Since the envelopes are comparitivally massive (~250) the owned copy
> inside the enum causes the enum size to increase from ~64 to ~300.  By
> boxing them, we can reduce the size of EmailSyncCacheHunk and pass
> around the heap allocated pointer, instead of cloning the value.

There is no more cache hunk since the sync refactor, so we can cancel
this patch.

Re: [PATCH email-lib] return Self explicitly in tcp structs 8 days ago

From Clément DOUIN to ~soywod/pimalaya

> Since the returned object can easily be used without the dynamically
> returned form it is better to return in a more useful form.  Added to
> that the new() method call is usually reserved for a function that
> directly returns the Self.

I agree with you about new() that should return Self, but I propose an
alternative to match better the email backend features. What about
introducing a second function new_boxed() that returns a Box<dyn T>?

Re: [PATCH email-lib] avoid using const for lazy identifiers a month ago

From Clément DOUIN to ~soywod/pimalaya

I partially applied this patch as this chunk did not look good to me:

> - let mut cmd = TOKIO_CMD;
> + let mut cmd = TOKIO_CMD.lock().await;

Since the command is used as mutable afterwards, it means that the lazy cell is
mutated. Instead we want a fresh instance of `Command` and mutate this
instance rather than the lazy cell itself. Here the modified patch:

> - const TOKIO_CMD: Lazy<tokio::process::Command> = Lazy::new(|| {
> + fn new_command() -> Command {
>
> - let mut cmd = TOKIO_CMD;
> + let mut cmd = new_command()

Re: [PATCH email-lib] document design decisions for the BackendBuilder a month ago

From Clément DOUIN to ~soywod/pimalaya

I applied manually this patch in the `backend-builder-v2` branch that I
will merge soon. Thank you!

-- 
Regards
Clément DOUIN
https://soywod.me

Re: [PATCH email-lib] use _or variants where arguments are not used a month ago

From Clément DOUIN to ~soywod/pimalaya

I would argue on this patch. For example:

> -            .unwrap_or_else(env::temp_dir)
> +            .unwrap_or(env::temp_dir())

The first one executes `env::temp_dir` only in case of failure, where
the second always execute `env::temp_dir`. So technically the first one
looks more approriate to me. What do you think?

-- 
Regards
Clément DOUIN
https://soywod.me

Re: [PATCH email-lib] remove some unneccessary or eager clones a month ago

From Clément DOUIN to ~soywod/pimalaya

Patched applied manually due to conflicts. Thank you!

-- 
Regards
Clément DOUIN
https://soywod.me

Re: [PATCH himalaya 3/3] remove useless to_string calls a month ago

From Clément DOUIN to ~soywod/pimalaya

Same, I will apply manually. Thank you!

> Reasons:
> - These implement display which have the same effect under println.
> 
> Signed-off-by: Perma Alesheikh <me@prma.dev>
> ---
>  src/imap/wizard.rs | 2 +-
>  src/smtp/wizard.rs | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/imap/wizard.rs b/src/imap/wizard.rs
> index 67e99e1..652961e 100644
> --- a/src/imap/wizard.rs