sendgc #103

Closed
andy wants to merge 5 commits from sendgc into master
andy commented 3 years ago
Collaborator

you can add friends but you cant actually search for them cus i got fed up from fighting the compiler.

you can add friends but you cant actually search for them cus i got fed up from fighting the compiler.
andy added 4 commits 3 years ago
24fdd705c5 f is for friends who do stuff together
f3294dfce8 a test i guess
f2c4094b8f andy vs clippy round 8
5898a8120a ci pls work
jake requested changes 3 years ago
[dependencies]
libpso = { git = "http://git.sharnoth.com/jake/libpso" }
libpso = { git = "http://git.sharnoth.com/jake/libpso", branch = "sendgc" }
jake commented 3 years ago
Poster
Owner

merge this in libpso

merge this in libpso
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct GuildCardDataId(pub u32);
// TODO: use these
jake commented 3 years ago
Poster
Owner

TODO: remove TODO

TODO: remove TODO
// TODO: use these
#[derive(Debug)]
pub enum GuildcardError {
GuildcardAlreadyFriend(u32),
jake commented 3 years ago
Poster
Owner

should be UserAccountId not u32 (or whatever proper not-number type is expected)

should be `UserAccountId` not `u32` (or whatever proper not-number type is expected)
}
// TODO: implement this properly
jake commented 3 years ago
Poster
Owner

TODO: determine if this was implemented properly

TODO: determine if this was implemented properly
pub id: GuildCardDataId,
pub user_id: UserAccountId,
pub guildcard: guildcard::GuildCardData,
pub guildcard_data: Box<guildcard::GuildCardData>,
jake commented 3 years ago
Poster
Owner

why is this boxed?

why is this boxed?
andy commented 3 years ago
Poster
Collaborator

GuildCardData is >50kb cus it contains the friendlist + blocklist.

`GuildCardData` is >50kb cus it contains the friendlist + blocklist.
}
pub fn add_friend(&mut self, new_friend: &GuildcardAccept) -> Result<(), GuildcardError> {
let next_open_spot = self.guildcard_data.friends
jake commented 3 years ago
Poster
Owner

.iter().position() might be preferable to .enumerate().find()?

`.iter().position()` might be preferable to `.enumerate().find()`?
andy added 1 commit 3 years ago
andy closed this pull request 2 years ago

Reviewers

jake requested changes 3 years ago
Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.