Skip to content

Conversation

@GnomedDev
Copy link
Member

@GnomedDev GnomedDev commented Jan 9, 2024

Shrinks size_of from 136 bytes to 64 bytes, while removing unused variants. This will improve performance for any method returning Result<T> where T is less than the size of Error as both Result's Ok and Err have to be allocated stack space.

@github-actions github-actions bot added framework Related to the `framework` and `framework::standard` modules and/or the `command_attr` crate model Related to the `model` module. client Related to the `client` module. builder Related to the `builder` module. http Related to the `http` module. gateway Related to the `gateway` module. examples Related to Serenity's examples. labels Jan 9, 2024
@GnomedDev GnomedDev force-pushed the error-cleanup branch 3 times, most recently from 3259fbf to 67fdecb Compare January 9, 2024 12:14
@github-actions github-actions bot added the utils Related to the `utils` module. label Jan 9, 2024
@GnomedDev GnomedDev force-pushed the error-cleanup branch 2 times, most recently from c134446 to 6874b55 Compare January 10, 2024 22:23
@github-actions github-actions bot removed the utils Related to the `utils` module. label Jan 10, 2024
@arqunis arqunis added enhancement An improvement to Serenity. breaking change The public API is changed, resulting in miscompilations or unexpected new behaviour for users labels Jan 10, 2024
@arqunis arqunis merged commit 82b0262 into serenity-rs:next Jan 10, 2024
@GnomedDev GnomedDev deleted the error-cleanup branch January 10, 2024 23:08
arqunis pushed a commit that referenced this pull request Jan 16, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
arqunis pushed a commit to arqunis/serenity that referenced this pull request Jan 22, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit that referenced this pull request Feb 9, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
arqunis pushed a commit that referenced this pull request Mar 1, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit that referenced this pull request Mar 10, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit that referenced this pull request Mar 11, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit that referenced this pull request Mar 11, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit to GnomedDev/serenity that referenced this pull request Mar 13, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit to GnomedDev/serenity that referenced this pull request Jun 9, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit that referenced this pull request Jun 22, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit to GnomedDev/serenity that referenced this pull request Jun 22, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Jul 29, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Jul 30, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit that referenced this pull request Aug 16, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit to GnomedDev/serenity that referenced this pull request Oct 7, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit to GnomedDev/serenity that referenced this pull request Oct 20, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit that referenced this pull request Oct 20, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit to GnomedDev/serenity that referenced this pull request Nov 11, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit that referenced this pull request Nov 13, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit to GnomedDev/serenity that referenced this pull request Nov 15, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Dec 8, 2024
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
arqunis pushed a commit to arqunis/serenity that referenced this pull request Jan 16, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Feb 1, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Feb 14, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Mar 5, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Mar 5, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Mar 7, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Mar 10, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Mar 11, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit to GnomedDev/serenity that referenced this pull request Mar 26, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit that referenced this pull request Apr 28, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
GnomedDev added a commit that referenced this pull request May 19, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Jun 30, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Jun 30, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Jul 28, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Jul 28, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Oct 7, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Oct 7, 2025
Shrinks `size_of::<Error>` from 136 bytes to 64 bytes, while removing unused
variants. This will improve performance for any method returning
`Result<T>` where `T` is less than the size of `Error` as both `Result`'s
`Ok` and `Err` have to be allocated stack space.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change The public API is changed, resulting in miscompilations or unexpected new behaviour for users builder Related to the `builder` module. client Related to the `client` module. enhancement An improvement to Serenity. examples Related to Serenity's examples. framework Related to the `framework` and `framework::standard` modules and/or the `command_attr` crate gateway Related to the `gateway` module. http Related to the `http` module. model Related to the `model` module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants