We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6856193 commit 6b07ee4Copy full SHA for 6b07ee4
src/method.rs
@@ -219,13 +219,9 @@ impl Method {
219
/// See [the spec](https://tools.ietf.org/html/rfc7231#section-4.2.2) for
220
/// more words.
221
pub fn is_idempotent(&self) -> bool {
222
- if self.is_safe() {
223
- true
224
- } else {
225
- match self.0 {
226
- Put | Delete => true,
227
- _ => false
228
- }
+ match self.0 {
+ Put | Delete | _ if self.is_safe() => true,
+ _ => false
229
}
230
231
0 commit comments