Skip to content

Commit

Permalink
Allow using Port::as_u16 in const contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
WhyNotHugo committed Feb 21, 2024
1 parent 4b8cc85 commit caf471b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/uri/port.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl<T> Port<T> {
/// let port = authority.port().unwrap();
/// assert_eq!(port.as_u16(), 80);
/// ```
pub fn as_u16(&self) -> u16 {
pub const fn as_u16(&self) -> u16 {
self.port
}
}
Expand Down

0 comments on commit caf471b

Please sign in to comment.