Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

general cleanup and maintenance #362

Merged
merged 3 commits into from
May 2, 2024
Merged

Conversation

AnthonyMichaelTDM
Copy link
Collaborator

  • changed StatusCode from i31 to u16.
  • refactored logic
  • expanded documentation
  • added TODOs
  • made some functions more generic (to improve API w/o causing breaking changes)

this is just a start, there's a lot of TODOs I still need to tackle as well

changed `StatusCode` from `i31` to `u16`.

refactored logic

expanded documentation

added TODOs

made some functions more generic (to improve API w/o causing breaking changes)
@Wulf
Copy link
Owner

Wulf commented Nov 18, 2023

Whao! Thanks for taking the time to do this.

Let's do this MR as usual, but going forward, it'll be much easier for me if we have smaller-sized changes! I know it's hard sometimes, especially when we combine everything from a working session into a single MR, but it makes it easier for me as I don't have all the time in the world (that way we can maintain shipping velocity!). I hope you understand :)

🤗

@AnthonyMichaelTDM
Copy link
Collaborator Author

sure, I can have this as base then do subsequent PR's to address the TOOD's and whatnot

@AnthonyMichaelTDM
Copy link
Collaborator Author

I forgot why I hadn't merged this yet, it's been a while...
I plan on looking over it again soon though

@AnthonyMichaelTDM AnthonyMichaelTDM marked this pull request as ready for review March 30, 2024 09:17
@AnthonyMichaelTDM
Copy link
Collaborator Author

Okay I think it's good now, gonna do one final review before I merge though

Copy link
Collaborator Author

@AnthonyMichaelTDM AnthonyMichaelTDM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

create-rust-app/src/auth/permissions/mod.rs Show resolved Hide resolved
Ok(s) => Box::leak(s.into_boxed_str()).as_bytes(),
Err(_) => panic!("No SECRET_KEY environment variable set!"),
},
secret: std::env::var("SECRET_KEY").map_or_else(|_| panic!("No SECRET_KEY environment variable set!"), |s| Box::leak(s.into_boxed_str()).as_bytes()),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might be able to just use a .map(...).expect(...) since we panic anyway

create-rust-app/src/dev/controller.rs Show resolved Hide resolved
create-rust-app/src/dev/mod.rs Show resolved Hide resolved
///
/// panis if the `to` argument is not a valid email address
///
/// TODO: wouldn't it be better to instead require the `to` argument be some wrapper around a string that is always a valid email address?
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

answer: yes it would, but that's something to do in a different PR

@AnthonyMichaelTDM AnthonyMichaelTDM merged commit 500c06d into main May 2, 2024
6 checks passed
@AnthonyMichaelTDM AnthonyMichaelTDM deleted the maintenance-and-cleanup branch May 2, 2024 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants