jameseb

joined 2 years ago
[–] [email protected] 2 points 2 years ago* (last edited 2 years ago) (1 children)

I'm glad my points we're helpful!

There is some documentation on examples in the Cargo book. The basic procedure is to put it in an examples directory alongside the src directory (and in its own subfolder if it has multiple files), and you can add an entry for it in the Cargo.toml (although it should automatically detect it if you put it in the examples directory, so that is only strictly necessary if you want to change the default settings).

[–] [email protected] 6 points 2 years ago* (last edited 2 years ago) (3 children)

A few things I noticed:

  • In http::request::parse(), do you actually need a BufReader? It would be better to make it generic over something implementing BufRead, that allows what you have but also makes tests and examples easier since you wouldn't have to open a TCP connection just to do something that is essentially string parsing.
  • In http::response::Response::to_string(), that match on lines 78-85 makes me uneasy, because you are silently changing the status code if it isn't one you recognise. It would be better to signal an error. It would be even better to just check when the status code is set (perhaps with a status code enum to list the ones you support, since what you have isn't all the defined codes) so that you can't fail when converting to a string.
  • Consider whether you need a special to_string() method at all, or whether you can just implement Display (which gives you to_string() for free via the ToString trait).
  • You are using String as an error type pretty much everywhere. The better approach is to create an enum representing all the possible errors, so that a user of your library can match against them. Make the enum implement Error and Display and it will fit fine into the rest of the error handling infrastructure. There are crates like thiserror that can reduce the boilerplate around this.
  • You have an io.rs that doesn't appear to be connected to anything.
  • You have a main.rs, which seems off in something that sounds like it should be purely a library crate. You probably want that to be an example or an integration test instead.

That's all I could see with a quick look. In terms of general advice: remember to look at warnings, run cargo clippy, and look at the API guidelines.

[–] [email protected] 4 points 2 years ago

25 isn't too young, and makes sense if you have focused on education and career. I followed a similar path in that I spent a lot of time in education, only starting to properly consider courting someone around the age of 25 or 26 after I finished my PhD. Things were complicated somewhat by Covid, but I got married last year at the age of 30.

As to losing weight, I can't speak much from experience on that, but losing some weight may be a good idea, as much for your own health as anything else. Unless you are really overweight (in which case it is a medical issue that you should address), I think you shouldn't worry too much about it in terms of dating.

[–] [email protected] 9 points 2 years ago

The understanding I've generally heard, and which seems supported by the context, is that the fig tree symbolises the unfruitfulness of God's people. This is particularly apparent in that both Matthew and Mark record it as happening alongside Jesus casting out people trading in the temple (Luke records the cleansing of the temple but not the fig tree thing). It is then followed by Jesus telling a series of parables against the religious leaders. There may also be a relation to the parable of the barren fig tree earlier on in Luke 13.

[–] [email protected] 2 points 2 years ago

I can understand why people wouldn't specifically talk about the fediverse on other sites. It just seems like there is a lot of coverage of X and Meta in the news, but there doesn't seem to have been even a passing mention of fediverse sites in most of what I've seen. I guess the more established social media sites are still a lot more significant than fediverse alternatives though.

[–] [email protected] 7 points 2 years ago (2 children)

What's sad is that people aren't talking about Mastodon nearly as much as they are talking about Threads and X. It just doesn't seem to get much publicity outside of the fediverse.

[–] [email protected] 9 points 2 years ago* (last edited 2 years ago)

Image uploads are currently disabled on lemm.ee: https://lemm.ee/post/5839513. Images were restricted in size before that as well to avoid using too much server space. The idea is to use image hosting sites instead.

[–] [email protected] 1 points 2 years ago

To add to that, there were even cases where a push for religious reform led directly to political reform, like the English Civil War.

[–] [email protected] 0 points 2 years ago

And in the evening service, a version of the Nun section of Psalm 119 to the tune of "Amazing Grace", and "The God of Abraham praise"

[–] [email protected] -1 points 2 years ago* (last edited 2 years ago) (1 children)

We did "Church of God, elect and glorious", a version of Psalm 29 to the tune of "Immortal, invisible", "How firm a foundation" and "Your glorious cause, O God" this morning.

[–] [email protected] 0 points 2 years ago

Definite atonement is certainly the better term for it

[–] [email protected] 17 points 2 years ago (3 children)
view more: ‹ prev next ›