<feed xmlns='http://www.w3.org/2005/Atom'>
<title>google-calendar-rsvp/src, branch master</title>
<subtitle>RSVP to Google Calendar events from the command line</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/google-calendar-rsvp/'/>
<entry>
<title>run(): Remove unused assignment to `email_eid`</title>
<updated>2021-07-09T19:34:50+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-07-09T19:34:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/google-calendar-rsvp/commit/?id=16a7c3136b1dffd3d3b44624642acc681bb8b08b'/>
<id>16a7c3136b1dffd3d3b44624642acc681bb8b08b</id>
<content type='text'>
This blog post by Dimitri Merejkowsky clued me into the fact that I had
incorrectly ignored a compiler warning about an unused assignment:
https://dmerej.info/blog/post/awesome-rust-warnings/#the-useless-mutation

When I wrote that line, I didn't realise you could declare an
uninitialised variable, and definitely didn't get what the compiler
meant when it told me:

    warning: value assigned to `email_eid` is never read
       --&gt; src/main.rs:102:9
        |
    102 |     let mut email_eid = String::new();
        |         ^^^^^^^^^^^^^
        |
        = note: `#[warn(unused_assignments)]` on by default
        = help: maybe it is overwritten before being read?

so I ignored the warning.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This blog post by Dimitri Merejkowsky clued me into the fact that I had
incorrectly ignored a compiler warning about an unused assignment:
https://dmerej.info/blog/post/awesome-rust-warnings/#the-useless-mutation

When I wrote that line, I didn't realise you could declare an
uninitialised variable, and definitely didn't get what the compiler
meant when it told me:

    warning: value assigned to `email_eid` is never read
       --&gt; src/main.rs:102:9
        |
    102 |     let mut email_eid = String::new();
        |         ^^^^^^^^^^^^^
        |
        = note: `#[warn(unused_assignments)]` on by default
        = help: maybe it is overwritten before being read?

so I ignored the warning.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove empty newline at the top of help output</title>
<updated>2021-05-23T18:22:28+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-05-23T18:22:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/google-calendar-rsvp/commit/?id=1f9796c48abdffde0842e73ebd000ab57f364e41'/>
<id>1f9796c48abdffde0842e73ebd000ab57f364e41</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add brief module-level documentation</title>
<updated>2021-05-23T18:09:17+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-05-23T18:09:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/google-calendar-rsvp/commit/?id=336a4bed16a0b3fda42088e7991537deaf6b5af0'/>
<id>336a4bed16a0b3fda42088e7991537deaf6b5af0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove empty newline at the end of help output</title>
<updated>2021-05-23T18:03:47+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-05-23T18:03:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/google-calendar-rsvp/commit/?id=0a6ec82e7de0bbbdd9b2eddf0bd1041f089f1534'/>
<id>0a6ec82e7de0bbbdd9b2eddf0bd1041f089f1534</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add license (GNU GPLv3+)</title>
<updated>2021-05-23T16:51:48+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-05-23T16:51:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/google-calendar-rsvp/commit/?id=1dfae4b5adc320291396b7003d7a4dfe32e81407'/>
<id>1dfae4b5adc320291396b7003d7a4dfe32e81407</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add function and enum documentation</title>
<updated>2021-05-22T22:57:34+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-05-22T22:57:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/google-calendar-rsvp/commit/?id=61c061aa679b1877208aec64c7d179363d4d0d0e'/>
<id>61c061aa679b1877208aec64c7d179363d4d0d0e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't print root_cause if there's only one error in the chain</title>
<updated>2021-05-22T22:39:31+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-05-22T22:39:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/google-calendar-rsvp/commit/?id=4b71bd433239739a104a7a3fe6b4aba4a2ad66e6'/>
<id>4b71bd433239739a104a7a3fe6b4aba4a2ad66e6</id>
<content type='text'>
If there's only one error in the chain, it prints:

    error: no matches for event ID: no matches for event ID

Now, it will print:

    error: no matches for event ID

and:

    error: unable to open OAuth secret file: Not a directory (os error 20)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If there's only one error in the chain, it prints:

    error: no matches for event ID: no matches for event ID

Now, it will print:

    error: no matches for event ID

and:

    error: unable to open OAuth secret file: Not a directory (os error 20)
</pre>
</div>
</content>
</entry>
<entry>
<title>Request Event read-write authorisation scope</title>
<updated>2021-05-22T22:05:18+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-05-22T22:05:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/google-calendar-rsvp/commit/?id=1d74a82aefdbc9936ee662c57dcdd8fa8364918a'/>
<id>1d74a82aefdbc9936ee662c57dcdd8fa8364918a</id>
<content type='text'>
Previously there were two OAuth authorisation prompts, one for each API
call, because each call has different default scopes.

Since we always need Event read-write access, set this as our scope for
both API calls so that we request only what the application as a whole
needs, and so we don't ask for authorisation twice (which requires
visiting a URL with one's Google account).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously there were two OAuth authorisation prompts, one for each API
call, because each call has different default scopes.

Since we always need Event read-write access, set this as our scope for
both API calls so that we request only what the application as a whole
needs, and so we don't ask for authorisation twice (which requires
visiting a URL with one's Google account).
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix "token.json" not found error</title>
<updated>2021-05-22T20:05:12+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-05-22T20:05:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/google-calendar-rsvp/commit/?id=cc90495f29cba19a8d3f4fa201d884ac543d1334'/>
<id>cc90495f29cba19a8d3f4fa201d884ac543d1334</id>
<content type='text'>
Because I was using `xdg_dirs.find_data_file()` to get the path to
"token.json", an error was triggered when the file didn't exist yet. It
doesn't need to exist because the program is supposed to create it, so
we can't use `find_data_file()`.

Remove the `local_data_file()` function, and instead call the XDG
functions directly where they're needed since in one case we need to
find an existing file (and error with a specific message if it doesn't
exist), and in another, we need a path to a file to create or read.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because I was using `xdg_dirs.find_data_file()` to get the path to
"token.json", an error was triggered when the file didn't exist yet. It
doesn't need to exist because the program is supposed to create it, so
we can't use `find_data_file()`.

Remove the `local_data_file()` function, and instead call the XDG
functions directly where they're needed since in one case we need to
find an existing file (and error with a specific message if it doesn't
exist), and in another, we need a path to a file to create or read.
</pre>
</div>
</content>
</entry>
<entry>
<title>Print error's root cause</title>
<updated>2021-05-22T20:01:52+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-05-22T20:01:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/google-calendar-rsvp/commit/?id=c65101ade6765afb805822c30994ececfacefc77'/>
<id>c65101ade6765afb805822c30994ececfacefc77</id>
<content type='text'>
Give more context about the error produced. Trying to figure out how to
only display this if there is a root cause, but I'll work that out
later.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Give more context about the error produced. Trying to figure out how to
only display this if there is a root cause, but I'll work that out
later.
</pre>
</div>
</content>
</entry>
</feed>
