sendgc
master
you can add friends but you cant actually search for them cus i got fed up from fighting the compiler.
[dependencies]
libpso = { git = "http://git.sharnoth.com/jake/libpso" }
libpso = { git = "http://git.sharnoth.com/jake/libpso", branch = "sendgc" }
merge this in libpso
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct GuildCardDataId(pub u32);
// TODO: use these
TODO: remove TODO
#[derive(Debug)]
pub enum GuildcardError {
GuildcardAlreadyFriend(u32),
should be UserAccountId not u32 (or whatever proper not-number type is expected)
UserAccountId
u32
}
// TODO: implement this 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>,
why is this boxed?
GuildCardData is >50kb cus it contains the friendlist + blocklist.
GuildCardData
pub fn add_friend(&mut self, new_friend: &GuildcardAccept) -> Result<(), GuildcardError> {
let next_open_spot = self.guildcard_data.friends
.iter().position() might be preferable to .enumerate().find()?
.iter().position()
.enumerate().find()
No due date set.
This pull request currently doesn't have any dependencies.
Deleting a branch is permanent. It CANNOT be undone. Continue?
you can add friends but you cant actually search for them cus i got fed up from fighting the compiler.
[dependencies]
libpso = { git = "http://git.sharnoth.com/jake/libpso" }
libpso = { git = "http://git.sharnoth.com/jake/libpso", branch = "sendgc" }
merge this in libpso
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct GuildCardDataId(pub u32);
// TODO: use these
TODO: remove TODO
// TODO: use these
#[derive(Debug)]
pub enum GuildcardError {
GuildcardAlreadyFriend(u32),
should be
UserAccountId
notu32
(or whatever proper not-number type is expected)}
// TODO: implement this 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>,
why is this boxed?
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
.iter().position()
might be preferable to.enumerate().find()
?Reviewers