init cargo fmt; readme++

This commit is contained in:
rskntroot
2024-07-27 04:28:17 +00:00
parent da821c51aa
commit cb992274c7
2 changed files with 17 additions and 5 deletions

View File

@@ -72,6 +72,22 @@ $ r53-ddns -z ${aws_dns_zone_id} -d example.com.
The DNS record is currently up to date with the public IP: 10.0.88.219 The DNS record is currently up to date with the public IP: 10.0.88.219
``` ```
### Tests
Yeah, I have em! Well... one of them.
```
$ cargo test
Compiling r53-ddns v0.1.0 (~/workspace/r53-ddns)
Finished `test` profile [unoptimized + debuginfo] target(s) in 3.81s
Running unittests src/main.rs (target/debug/deps/r53_ddns-9ff92b89721daeea)
running 1 test
test tests::get_public_ip_works ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.07s
```
## Q&A ## Q&A
> Why are you doing AWS calls instead of us nslookup and compare that? > Why are you doing AWS calls instead of us nslookup and compare that?

View File

@@ -138,11 +138,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Check the status of the change request every 60 seconds // Check the status of the change request every 60 seconds
loop { loop {
let change_response = client let change_response = client.get_change().id(&change_id).send().await?;
.get_change()
.id(&change_id)
.send()
.await?;
// check the status // check the status
if let Some(change_info) = change_response.change_info { if let Some(change_info) = change_response.change_info {