]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
2 years agopacket: turn tunnel lock into spinlock 8085/head
Victor Julien [Fri, 21 Oct 2022 19:22:23 +0000 (21:22 +0200)] 
packet: turn tunnel lock into spinlock

Lock is only held to update/check ints, so spin lock will be more
efficient.

Place the member of Packet in a new "persistent" area to make it
clear this is not touched by the PacketReinit logic.

Ticket: #5592.

2 years agostream/tcp: remove obsolete and commented out tests
Victor Julien [Tue, 25 Oct 2022 07:21:04 +0000 (09:21 +0200)] 
stream/tcp: remove obsolete and commented out tests

2 years agodecode/vxlan/tests: don't memset new packet
Victor Julien [Tue, 25 Oct 2022 07:18:47 +0000 (09:18 +0200)] 
decode/vxlan/tests: don't memset new packet

2 years agodecode/mpls/tests: improve pkt handling; cleanups
Victor Julien [Tue, 25 Oct 2022 07:16:27 +0000 (09:16 +0200)] 
decode/mpls/tests: improve pkt handling; cleanups

2 years agoapp-layer/tests: don't memset new packet
Victor Julien [Tue, 25 Oct 2022 07:15:46 +0000 (09:15 +0200)] 
app-layer/tests: don't memset new packet

2 years agodoc/devguide: update packet (de)alloc in unittests
Victor Julien [Tue, 25 Oct 2022 07:07:58 +0000 (09:07 +0200)] 
doc/devguide: update packet (de)alloc in unittests

2 years agodecode/geneve/tests: don't memset packet
Victor Julien [Tue, 25 Oct 2022 07:05:17 +0000 (09:05 +0200)] 
decode/geneve/tests: don't memset packet

Packet is already initialized.

2 years agothreading: improve/add thread queues explanations
Victor Julien [Sat, 22 Oct 2022 12:33:05 +0000 (14:33 +0200)] 
threading: improve/add thread queues explanations

2 years agoeve/alert: remove tunnel locking
Victor Julien [Fri, 21 Oct 2022 19:21:28 +0000 (21:21 +0200)] 
eve/alert: remove tunnel locking

Tunnel lock is only used to sync verdict logic.

2 years agodecode: alloc packets using calloc
Victor Julien [Fri, 21 Oct 2022 18:54:24 +0000 (20:54 +0200)] 
decode: alloc packets using calloc

2 years agopacketpool: remove PKT_ALLOC flag
Victor Julien [Fri, 21 Oct 2022 18:53:17 +0000 (20:53 +0200)] 
packetpool: remove PKT_ALLOC flag

Use Packet::pool instead. If Packet::pool is non-NULL the packet is
owned by a pool. Otherwise it is allocated and should be freed after
use.

2 years agorunmodes: remove dead error check
Victor Julien [Fri, 21 Oct 2022 10:05:06 +0000 (12:05 +0200)] 
runmodes: remove dead error check

2 years agosmtp/mime: no error logging in packet path
Victor Julien [Fri, 21 Oct 2022 09:38:36 +0000 (11:38 +0200)] 
smtp/mime: no error logging in packet path

2 years agodefrag: no error logging in packet path
Victor Julien [Fri, 21 Oct 2022 09:38:10 +0000 (11:38 +0200)] 
defrag: no error logging in packet path

2 years agoapplayer: make sure to use correct ipproto
Victor Julien [Mon, 24 Oct 2022 18:20:30 +0000 (20:20 +0200)] 
applayer: make sure to use correct ipproto

2 years agoeve/alert: use flow proto to avoid crash on ICMP
Victor Julien [Mon, 24 Oct 2022 12:28:50 +0000 (14:28 +0200)] 
eve/alert: use flow proto to avoid crash on ICMP

2 years agodetect-filemd5: convert unittests to FAIL/PASS APIs
Alice Akaki [Sat, 22 Oct 2022 13:30:28 +0000 (09:30 -0400)] 
detect-filemd5: convert unittests to FAIL/PASS APIs

Task: #4035

2 years agodetect-filesha256: convert unittests to FAIL/PASS APIs
Alice Akaki [Sat, 22 Oct 2022 13:14:23 +0000 (09:14 -0400)] 
detect-filesha256: convert unittests to FAIL/PASS APIs

Task: #4038

2 years agogithub-actions: bump actions/upload-artifact from 3.1.0 to 3.1.1
dependabot[bot] [Fri, 21 Oct 2022 20:00:34 +0000 (20:00 +0000)] 
github-actions: bump actions/upload-artifact from 3.1.0 to 3.1.1

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/3cea5372237819ed00197afe530f5a7ea3e805c8...83fd05a356d7e2593de66fc9913b3002723633cb)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agogithub-actions: bump actions/download-artifact from 3.0.0 to 3.0.1
dependabot[bot] [Fri, 21 Oct 2022 20:00:29 +0000 (20:00 +0000)] 
github-actions: bump actions/download-artifact from 3.0.0 to 3.0.1

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/fb598a63ae348fa914e94cd0ff38f362e927b741...9782bd6a9848b53b110e712e20e42d89988822b7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agorust: fix lint warnings about mixed case hex literals
Alice Akaki [Fri, 14 Oct 2022 04:06:31 +0000 (00:06 -0400)] 
rust: fix lint warnings about mixed case hex literals

Ticket: #4593

2 years agorust: fix lint warnings about if same then else
Gabriel Lima Luz [Fri, 14 Oct 2022 16:17:31 +0000 (13:17 -0300)] 
rust: fix lint warnings about if same then else

Ticket: 4609

2 years agorust: fix lint warnings about ptr_arg
Kristina Jefferson [Thu, 13 Oct 2022 19:28:15 +0000 (14:28 -0500)] 
rust: fix lint warnings about ptr_arg

Ticket: #4599

2 years agorust: fix clippy lint for unneeded late initialization
Jason Ish [Fri, 14 Oct 2022 17:59:20 +0000 (11:59 -0600)] 
rust: fix clippy lint for unneeded late initialization

2 years agorust: fix clippy lint for cmp_null is debug code
Jason Ish [Fri, 14 Oct 2022 17:54:07 +0000 (11:54 -0600)] 
rust: fix clippy lint for cmp_null is debug code

Ticket: 5577

2 years agorust: fix clippy lints for unneeded reference in debug code
Jason Ish [Fri, 14 Oct 2022 17:42:22 +0000 (11:42 -0600)] 
rust: fix clippy lints for unneeded reference in debug code

2 years agorust: fix clippy lints for is_empty in debug code
Jason Ish [Fri, 14 Oct 2022 17:38:20 +0000 (11:38 -0600)] 
rust: fix clippy lints for is_empty in debug code

2 years agogithub-ci: running clippy with all features
Jason Ish [Thu, 6 Oct 2022 18:23:24 +0000 (12:23 -0600)] 
github-ci: running clippy with all features

Without it, it own't see the usage of variables in SCDebugLog macros,
etc.

2 years agorust: don't allow fixed up clippy lints
Jason Ish [Wed, 5 Oct 2022 15:36:45 +0000 (09:36 -0600)] 
rust: don't allow fixed up clippy lints

2 years agorust: clippy fix for bitwise or with 0
Jason Ish [Wed, 5 Oct 2022 15:30:54 +0000 (09:30 -0600)] 
rust: clippy fix for bitwise or with 0

2 years agorust: fix clippy lints for clippy::unnecessary_cast
Jason Ish [Wed, 5 Oct 2022 15:07:07 +0000 (09:07 -0600)] 
rust: fix clippy lints for clippy::unnecessary_cast

2 years agorust: fix clippy lints for clippy::redundant_static_lifetimes
Jason Ish [Wed, 5 Oct 2022 15:06:01 +0000 (09:06 -0600)] 
rust: fix clippy lints for clippy::redundant_static_lifetimes

2 years agorust: fix clippy lints for clippy::redundant_pattern_matching
Jason Ish [Wed, 5 Oct 2022 15:05:45 +0000 (09:05 -0600)] 
rust: fix clippy lints for clippy::redundant_pattern_matching

2 years agorust: fix clippy lints for clippy::nonminimal_bool
Jason Ish [Wed, 5 Oct 2022 15:05:12 +0000 (09:05 -0600)] 
rust: fix clippy lints for clippy::nonminimal_bool

2 years agorust: fix clippy lints for clippy::map_flatten
Jason Ish [Wed, 5 Oct 2022 15:02:39 +0000 (09:02 -0600)] 
rust: fix clippy lints for clippy::map_flatten

2 years agorust: fix clippy lints for clippy::manual_find
Jason Ish [Wed, 5 Oct 2022 15:02:21 +0000 (09:02 -0600)] 
rust: fix clippy lints for clippy::manual_find

2 years agorust: fix clippy lints for clippy::collapsible_if
Jason Ish [Wed, 5 Oct 2022 15:00:21 +0000 (09:00 -0600)] 
rust: fix clippy lints for clippy::collapsible_if

2 years agorust: fix clippy lints for clippy::collapsible_else_if
Jason Ish [Wed, 5 Oct 2022 15:00:04 +0000 (09:00 -0600)] 
rust: fix clippy lints for clippy::collapsible_else_if

2 years agorust: fix clippy lints for clippy::bool_comparison
Jason Ish [Wed, 5 Oct 2022 14:59:48 +0000 (08:59 -0600)] 
rust: fix clippy lints for clippy::bool_comparison

2 years agorust: fix clippy lints for clippy::crate_in_macro_def
Jason Ish [Wed, 5 Oct 2022 14:59:31 +0000 (08:59 -0600)] 
rust: fix clippy lints for clippy::crate_in_macro_def

2 years agorust: fix clippy lints for clippy::redundant_field_names
Jason Ish [Wed, 5 Oct 2022 14:58:55 +0000 (08:58 -0600)] 
rust: fix clippy lints for clippy::redundant_field_names

2 years agorust: fix clippy lints for clippy::needless_bool
Jason Ish [Wed, 5 Oct 2022 14:58:38 +0000 (08:58 -0600)] 
rust: fix clippy lints for clippy::needless_bool

2 years agorust: fix clippy lints for clippy::manual_range_contains
Jason Ish [Wed, 5 Oct 2022 14:58:03 +0000 (08:58 -0600)] 
rust: fix clippy lints for clippy::manual_range_contains

2 years agorust: fix clippy lints for clippy::len_zero
Jason Ish [Wed, 5 Oct 2022 14:57:27 +0000 (08:57 -0600)] 
rust: fix clippy lints for clippy::len_zero

2 years agorust: fix clippy lints for clippy::char_lit_as_u8
Jason Ish [Wed, 5 Oct 2022 14:53:02 +0000 (08:53 -0600)] 
rust: fix clippy lints for clippy::char_lit_as_u8

2 years agorust: fix clippy lints for clippy::assign_op_pattern
Jason Ish [Wed, 5 Oct 2022 14:52:44 +0000 (08:52 -0600)] 
rust: fix clippy lints for clippy::assign_op_pattern

2 years agorust: fix clippy lints for clippy::derive_partial_eq_without_eq
Jason Ish [Wed, 5 Oct 2022 14:52:14 +0000 (08:52 -0600)] 
rust: fix clippy lints for clippy::derive_partial_eq_without_eq

2 years agorust: suppress large enum variant lint at location
Jason Ish [Tue, 4 Oct 2022 15:26:37 +0000 (09:26 -0600)] 
rust: suppress large enum variant lint at location

And disable the global lint.

2 years agorust/http2: box decompressor variants
Jason Ish [Tue, 4 Oct 2022 15:13:25 +0000 (09:13 -0600)] 
rust/http2: box decompressor variants

These variants, in particular the Brotli one can be large at over 2500
bytes which is allocated no matter which decompressor is being used.

Gzip comes in at over 500 bytes.  Box deflate for consistency.

2 years agorust: remove clippy lints that no longer warn
Jason Ish [Tue, 4 Oct 2022 14:29:28 +0000 (08:29 -0600)] 
rust: remove clippy lints that no longer warn

2 years agorust: sort clippy allow statements
Jason Ish [Tue, 4 Oct 2022 14:16:04 +0000 (08:16 -0600)] 
rust: sort clippy allow statements

2 years agosrc: Use WARN_UNUSED for ByteExtract* functions
Haleema Khan [Tue, 18 Oct 2022 23:10:02 +0000 (04:10 +0500)] 
src: Use WARN_UNUSED for ByteExtract* functions

Add WARN_UNUSED macro for ByteExtract* functions
Fix warning raised in code related to WARN_UNUSED for ByteExtract*

Ticket: #3658

2 years agogithub-actions: bump ossf/scorecard-action from 2.0.4 to 2.0.6
dependabot[bot] [Wed, 19 Oct 2022 19:44:18 +0000 (19:44 +0000)] 
github-actions: bump ossf/scorecard-action from 2.0.4 to 2.0.6

Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.0.4 to 2.0.6.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/e363bfca00e752f91de7b7d2a77340e2e523cb18...99c53751e09b9529366343771cc321ec74e9bd3d)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agodetect-filename: convert unittests to FAIL/PASS APIs
Alice Akaki [Mon, 17 Oct 2022 21:44:15 +0000 (17:44 -0400)] 
detect-filename: convert unittests to FAIL/PASS APIs

Task: #4036

2 years agodetect-filemagic: convert unittests to FAIL/PASS APIs
Alice Akaki [Tue, 18 Oct 2022 16:11:57 +0000 (12:11 -0400)] 
detect-filemagic: convert unittests to FAIL/PASS APIs

Task: #4034

2 years agodocs: remove outdated constraint of negation support for ssl_state
Lukas Sismis [Mon, 17 Oct 2022 08:01:37 +0000 (10:01 +0200)] 
docs: remove outdated constraint of negation support for ssl_state

Commit 487cdda93d1836acc33323c3b57135c1844a8f41 adds negation support for the SSL state.

2 years agoflow/storage: use const for getter 8042/head
Victor Julien [Thu, 20 Oct 2022 05:41:09 +0000 (07:41 +0200)] 
flow/storage: use const for getter

2 years agoeve: mac logging code cleanup
Victor Julien [Thu, 20 Oct 2022 05:38:37 +0000 (07:38 +0200)] 
eve: mac logging code cleanup

2 years agoeve/drop: log direction if we have a flow
Victor Julien [Wed, 19 Oct 2022 12:29:05 +0000 (12:29 +0000)] 
eve/drop: log direction if we have a flow

2 years agoeve: log mac addresses in packet direction
Victor Julien [Wed, 19 Oct 2022 12:26:53 +0000 (12:26 +0000)] 
eve: log mac addresses in packet direction

2 years agodpdk: fix timestamp issues
Victor Julien [Wed, 19 Oct 2022 12:18:20 +0000 (12:18 +0000)] 
dpdk: fix timestamp issues

Each thread had its own version of the `machine_start_time`, which
lead to slight time differences. This became apparent mostly in IPS,
where 2 threads each process a side of the flow.

This patch makes the `machine_start_time` global.

2 years agopacket: move action functions to packet files
Victor Julien [Tue, 18 Oct 2022 14:18:06 +0000 (16:18 +0200)] 
packet: move action functions to packet files

2 years agodetect/tag: improve time handling on windows
Victor Julien [Tue, 18 Oct 2022 12:08:02 +0000 (14:08 +0200)] 
detect/tag: improve time handling on windows

Bug: #5584.

2 years agodetect: unittest guards for ut only function
Victor Julien [Sat, 15 Oct 2022 14:10:22 +0000 (16:10 +0200)] 
detect: unittest guards for ut only function

2 years agodetect: remove unused function
Victor Julien [Sat, 15 Oct 2022 14:05:58 +0000 (16:05 +0200)] 
detect: remove unused function

2 years agoeve/alert: minor cleanups
Victor Julien [Sat, 15 Oct 2022 08:48:15 +0000 (10:48 +0200)] 
eve/alert: minor cleanups

2 years agococci: remove action check as we no longer use macros
Victor Julien [Sat, 15 Oct 2022 08:35:39 +0000 (10:35 +0200)] 
cocci: remove action check as we no longer use macros

2 years agodetect: issue drop to root packet in all cases
Victor Julien [Thu, 13 Oct 2022 14:34:50 +0000 (16:34 +0200)] 
detect: issue drop to root packet in all cases

Update DROP action handling in tunnel packets. DROP/REJECT action is set
to outer (root) and inner packet.

Check action flags both against outer (root) and inner packet.

Remove PACKET_SET_ACTION macro. Replace with RESET for the one reset usecase.
The reason to remove is to make the logic easier to understand.

Reduce scope of RESET macros.

Rename PacketTestAction to PacketCheckAction except in unittests. Keep
PacketTestAction as a wrapper around PacketCheckAction. This makes it
easier to trace the action handling in the real code.

Fix rate_filter setting actions directly.

General code cleanups.

Bug: #5571.

2 years agopacketpool: debug message to assist drop checks
Victor Julien [Fri, 14 Oct 2022 09:27:13 +0000 (11:27 +0200)] 
packetpool: debug message to assist drop checks

2 years agopacketpool: remove debug validation check
Victor Julien [Thu, 13 Oct 2022 17:04:46 +0000 (19:04 +0200)] 
packetpool: remove debug validation check

Current packet might be the root or a child. Root would have set
drop action set, but Packet::pkt_src might be set in either.

2 years agodecode: minor code cleanup
Victor Julien [Tue, 18 Oct 2022 13:57:19 +0000 (15:57 +0200)] 
decode: minor code cleanup

2 years agonfq: set drop reason on verdict error
Victor Julien [Thu, 13 Oct 2022 17:32:37 +0000 (19:32 +0200)] 
nfq: set drop reason on verdict error

2 years agonapatech: reduce size of Packet structure
Victor Julien [Fri, 14 Oct 2022 07:39:11 +0000 (09:39 +0200)] 
napatech: reduce size of Packet structure

Put napatech packet vars in the union that is meant for this type of
data.

2 years agodoc/acknowledgements: add a few more names 7996/head
Juliana Fajardini [Tue, 11 Oct 2022 23:54:10 +0000 (20:54 -0300)] 
doc/acknowledgements: add a few more names

Added some names of known contributors to the documentation

2 years agodevguide: add section about stale tickets policy
Juliana Fajardini [Tue, 11 Oct 2022 23:44:52 +0000 (20:44 -0300)] 
devguide: add section about stale tickets policy

Just to set the right expectations, and to have it registered for us,
too.

2 years agodetect-fileext: convert unittests to FAIL/PASS APIs
Haleema Khan [Thu, 13 Oct 2022 02:23:30 +0000 (07:23 +0500)] 
detect-fileext: convert unittests to FAIL/PASS APIs

Fixes Bug: #4033

2 years agorust: fix lint warning for clippy::enum's name
Haleema Khan [Wed, 12 Oct 2022 05:24:18 +0000 (10:24 +0500)] 
rust: fix lint warning for clippy::enum's name

Ticket: #4597

2 years agodpdk: fix mempool cache error message
Lukas Sismis [Wed, 12 Oct 2022 12:24:07 +0000 (14:24 +0200)] 
dpdk: fix mempool cache error message

2 years agodoc: update base64_decode notes 7987/head
Shivani Bhardwaj [Mon, 10 Oct 2022 11:11:09 +0000 (16:41 +0530)] 
doc: update base64_decode notes

2 years agobase64: add and clean tests
Shivani Bhardwaj [Fri, 7 Oct 2022 06:31:45 +0000 (12:01 +0530)] 
base64: add and clean tests

2 years agobase64: add new mode as per RFC 4648
Shivani Bhardwaj [Wed, 5 Oct 2022 11:10:07 +0000 (16:40 +0530)] 
base64: add new mode as per RFC 4648

As per RFC 4648,
Implementations MUST reject the encoded data if it contains characters
outside the base alphabet when interpreting base-encoded data, unless
the specification referring to this document explicitly states
otherwise.

Add a new mode BASE64_MODE_RFC4648, and handle input strictly as per the
specification.

Bug 5223

2 years agotransversal: remove suricata-ids.org references 7983/head
Lukas Sismis [Mon, 10 Oct 2022 20:00:37 +0000 (22:00 +0200)] 
transversal: remove suricata-ids.org references

2 years agogithub-actions: bump actions/checkout from 2 to 3.1.0 7966/head
dependabot[bot] [Tue, 4 Oct 2022 10:20:51 +0000 (10:20 +0000)] 
github-actions: bump actions/checkout from 2 to 3.1.0

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agogithub-actions: bump actions/cache from 3.0.8 to 3.0.10
dependabot[bot] [Mon, 3 Oct 2022 19:42:13 +0000 (19:42 +0000)] 
github-actions: bump actions/cache from 3.0.8 to 3.0.10

Bumps [actions/cache](https://github.com/actions/cache) from 3.0.8 to 3.0.10.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/fd5de65bc895cf536527842281bea11763fefd77...56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agogithub-ci: add workflow for rust clippy
Jason Ish [Mon, 3 Oct 2022 22:30:31 +0000 (16:30 -0600)] 
github-ci: add workflow for rust clippy

2 years agorust: fix clippy lint for null comparison
Jason Ish [Mon, 3 Oct 2022 22:20:06 +0000 (16:20 -0600)] 
rust: fix clippy lint for null comparison

Use .is_null() instead of checking for equality against
std::ptr::null().

2 years agorust/modbus: derive default instead of manual impl
Jason Ish [Mon, 3 Oct 2022 22:17:07 +0000 (16:17 -0600)] 
rust/modbus: derive default instead of manual impl

Cleans up a clippy lint for a trivial default impl that can be derived.

2 years agorust/frames: cleanup clippy lint for unsafe
Jason Ish [Mon, 3 Oct 2022 22:15:12 +0000 (16:15 -0600)] 
rust/frames: cleanup clippy lint for unsafe

Where possible mark the relevant functions unsafe.  Otherwise suppress
the warning for now as this pattern is supposed to be a safe API around
an unsafe one. Might need some further investigation, but in general the
"guarantee" here is provided from the C side.

2 years agorust: fix clippy lint for unnecessary_unwrap
Jason Ish [Mon, 3 Oct 2022 22:01:09 +0000 (16:01 -0600)] 
rust: fix clippy lint for unnecessary_unwrap

Avoid check if not none followed by unwrap.

2 years agorust: fix clippy lint for single_char_add_str
Jason Ish [Mon, 3 Oct 2022 21:44:06 +0000 (15:44 -0600)] 
rust: fix clippy lint for single_char_add_str

Idiomatic cleanup and a fix automatically done by `cargo clippy --fix`.

2 years agorust: fix clippy lint for bool_assert_comparison
Jason Ish [Mon, 3 Oct 2022 21:42:20 +0000 (15:42 -0600)] 
rust: fix clippy lint for bool_assert_comparison

Checking for is_empty is faster than checking for equality.

2 years agorust: fix clippy lint for partialeq_to_none
Jason Ish [Mon, 3 Oct 2022 21:40:46 +0000 (15:40 -0600)] 
rust: fix clippy lint for partialeq_to_none

Use .is_some() and .is_none() instead of comparing against None.
Comparing against None requires a value to impl PartialEq, is_none() and
is_some() do not and are more idiomatic.

2 years agorust: fix clippy lint for explicit_auto_deref
Jason Ish [Mon, 3 Oct 2022 21:35:35 +0000 (15:35 -0600)] 
rust: fix clippy lint for explicit_auto_deref

This adds unnecessary complexity to code.

2 years agorust: fix clippy lint for needless_late_init
Jason Ish [Mon, 3 Oct 2022 21:32:07 +0000 (15:32 -0600)] 
rust: fix clippy lint for needless_late_init

2 years agorust: fix clippy lint for borrow_deref_ref
Jason Ish [Mon, 3 Oct 2022 21:28:50 +0000 (15:28 -0600)] 
rust: fix clippy lint for borrow_deref_ref

This type of borrow then reference has no effect.

2 years agorust: fix clippy lint for redundant_closure
Jason Ish [Mon, 3 Oct 2022 21:25:50 +0000 (15:25 -0600)] 
rust: fix clippy lint for redundant_closure

Removes a closure where the function can be directly provided.

2 years agorust: fix clippy ling for needless borrows
Jason Ish [Mon, 3 Oct 2022 21:09:32 +0000 (15:09 -0600)] 
rust: fix clippy ling for needless borrows

Cleanup needless borrows found by clippy. This fix done automatically by
`cargo clippy --fix`.

2 years agorust: allow some more clippy lints
Jason Ish [Mon, 3 Oct 2022 21:21:35 +0000 (15:21 -0600)] 
rust: allow some more clippy lints

Allow these lints for now until some more investigation can be done, as
--fix attempts to fix these.

2 years agorust: compile check rewording
Victor Julien [Tue, 4 Oct 2022 09:21:40 +0000 (11:21 +0200)] 
rust: compile check rewording

2 years agostream/rules: disable depth rule by default
Victor Julien [Tue, 4 Oct 2022 08:48:56 +0000 (10:48 +0200)] 
stream/rules: disable depth rule by default