@@ -171,7 +171,7 @@ impl std::fmt::Debug for __WebPDecBufferUnion {
171
171
172
172
/// Enumeration of the status codes
173
173
#[ allow( non_camel_case_types) ]
174
- // #[cfg_attr(feature = "must-use", must_use) ] // meaningless for type aliases
174
+ // #[must_use] // meaningless for type aliases
175
175
pub type VP8StatusCode = u32 ;
176
176
177
177
pub const VP8_STATUS_OK : VP8StatusCode = 0 ;
@@ -325,7 +325,7 @@ unsafe extern "C" {
325
325
/// RIFF + VP8X + (optional chunks) + VP8(L)
326
326
/// ALPH + VP8 <-- Not a valid WebP format: only allowed for internal purpose.
327
327
/// VP8(L) <-- Not a valid WebP format: only allowed for internal purpose.
328
- #[ cfg_attr ( feature = "must-use" , must_use) ]
328
+ #[ must_use]
329
329
pub fn WebPGetInfo (
330
330
data : * const u8 ,
331
331
data_size : usize ,
@@ -337,23 +337,23 @@ unsafe extern "C" {
337
337
/// memory is R, G, B, A, R, G, B, A... in scan order (endian-independent).
338
338
/// The returned pointer should be deleted calling WebPFree().
339
339
/// Returns NULL in case of error.
340
- #[ cfg_attr ( feature = "must-use" , must_use) ]
340
+ #[ must_use]
341
341
pub fn WebPDecodeRGBA (
342
342
data : * const u8 ,
343
343
data_size : usize ,
344
344
width : * mut c_int ,
345
345
height : * mut c_int ,
346
346
) -> * mut u8 ;
347
347
/// Same as WebPDecodeRGBA, but returning A, R, G, B, A, R, G, B... ordered data.
348
- #[ cfg_attr ( feature = "must-use" , must_use) ]
348
+ #[ must_use]
349
349
pub fn WebPDecodeARGB (
350
350
data : * const u8 ,
351
351
data_size : usize ,
352
352
width : * mut c_int ,
353
353
height : * mut c_int ,
354
354
) -> * mut u8 ;
355
355
/// Same as WebPDecodeRGBA, but returning B, G, R, A, B, G, R, A... ordered data.
356
- #[ cfg_attr ( feature = "must-use" , must_use) ]
356
+ #[ must_use]
357
357
pub fn WebPDecodeBGRA (
358
358
data : * const u8 ,
359
359
data_size : usize ,
@@ -362,15 +362,15 @@ unsafe extern "C" {
362
362
) -> * mut u8 ;
363
363
/// Same as WebPDecodeRGBA, but returning R, G, B, R, G, B... ordered data.
364
364
/// If the bitstream contains transparency, it is ignored.
365
- #[ cfg_attr ( feature = "must-use" , must_use) ]
365
+ #[ must_use]
366
366
pub fn WebPDecodeRGB (
367
367
data : * const u8 ,
368
368
data_size : usize ,
369
369
width : * mut c_int ,
370
370
height : * mut c_int ,
371
371
) -> * mut u8 ;
372
372
/// Same as WebPDecodeRGB, but returning B, G, R, B, G, R... ordered data.
373
- #[ cfg_attr ( feature = "must-use" , must_use) ]
373
+ #[ must_use]
374
374
pub fn WebPDecodeBGR (
375
375
data : * const u8 ,
376
376
data_size : usize ,
@@ -387,7 +387,7 @@ unsafe extern "C" {
387
387
/// 'width' and 'height' may be NULL, the other pointers must not be.
388
388
/// Returns NULL in case of error.
389
389
/// (*) Also named Y'CbCr. See: <https://en.wikipedia.org/wiki/YCbCr>
390
- #[ cfg_attr ( feature = "must-use" , must_use) ]
390
+ #[ must_use]
391
391
pub fn WebPDecodeYUV (
392
392
data : * const u8 ,
393
393
data_size : usize ,
@@ -406,23 +406,23 @@ unsafe extern "C" {
406
406
// The parameter 'output_stride' specifies the distance (in bytes)
407
407
// between scanlines. Hence, output_buffer_size is expected to be at least
408
408
// output_stride x picture-height.
409
- #[ cfg_attr ( feature = "must-use" , must_use) ]
409
+ #[ must_use]
410
410
pub fn WebPDecodeRGBAInto (
411
411
data : * const u8 ,
412
412
data_size : usize ,
413
413
output_buffer : * mut u8 ,
414
414
output_buffer_size : usize ,
415
415
output_stride : c_int ,
416
416
) -> * mut u8 ;
417
- #[ cfg_attr ( feature = "must-use" , must_use) ]
417
+ #[ must_use]
418
418
pub fn WebPDecodeARGBInto (
419
419
data : * const u8 ,
420
420
data_size : usize ,
421
421
output_buffer : * mut u8 ,
422
422
output_buffer_size : usize ,
423
423
output_stride : c_int ,
424
424
) -> * mut u8 ;
425
- #[ cfg_attr ( feature = "must-use" , must_use) ]
425
+ #[ must_use]
426
426
pub fn WebPDecodeBGRAInto (
427
427
data : * const u8 ,
428
428
data_size : usize ,
@@ -432,15 +432,15 @@ unsafe extern "C" {
432
432
) -> * mut u8 ;
433
433
// RGB and BGR variants. Here too the transparency information, if present,
434
434
// will be dropped and ignored.
435
- #[ cfg_attr ( feature = "must-use" , must_use) ]
435
+ #[ must_use]
436
436
pub fn WebPDecodeRGBInto (
437
437
data : * const u8 ,
438
438
data_size : usize ,
439
439
output_buffer : * mut u8 ,
440
440
output_buffer_size : usize ,
441
441
output_stride : c_int ,
442
442
) -> * mut u8 ;
443
- #[ cfg_attr ( feature = "must-use" , must_use) ]
443
+ #[ must_use]
444
444
pub fn WebPDecodeBGRInto (
445
445
data : * const u8 ,
446
446
data_size : usize ,
@@ -455,7 +455,7 @@ unsafe extern "C" {
455
455
/// 'u_size' and 'v_size' respectively.
456
456
/// Pointer to the luma plane ('*luma') is returned or NULL if an error occurred
457
457
/// during decoding (or because some buffers were found to be too small).
458
- #[ cfg_attr ( feature = "must-use" , must_use) ]
458
+ #[ must_use]
459
459
pub fn WebPDecodeYUVInto (
460
460
data : * const u8 ,
461
461
data_size : usize ,
@@ -471,7 +471,7 @@ unsafe extern "C" {
471
471
) -> * mut u8 ;
472
472
/// Internal, version-checked, entry point
473
473
#[ doc( hidden) ]
474
- #[ cfg_attr ( feature = "must-use" , must_use) ]
474
+ #[ must_use]
475
475
pub fn WebPInitDecBufferInternal ( _: * mut WebPDecBuffer , _: c_int ) -> c_int ;
476
476
/// Free any memory associated with the buffer. Must always be called last.
477
477
/// Note: doesn't free the 'buffer' structure itself.
@@ -488,7 +488,7 @@ unsafe extern "C" {
488
488
/// within valid bounds.
489
489
/// All other fields of WebPDecBuffer MUST remain constant between calls.
490
490
/// Returns NULL if the allocation failed.
491
- #[ cfg_attr ( feature = "must-use" , must_use) ]
491
+ #[ must_use]
492
492
pub fn WebPINewDecoder ( output_buffer : * mut WebPDecBuffer ) -> * mut WebPIDecoder ;
493
493
/// This function allocates and initializes an incremental-decoder object, which
494
494
/// will output the RGB/A samples specified by 'csp' into a preallocated
@@ -500,7 +500,7 @@ unsafe extern "C" {
500
500
/// colorspace 'csp' is taken into account for allocating this buffer. All other
501
501
/// parameters are ignored.
502
502
/// Returns NULL if the allocation failed, or if some parameters are invalid.
503
- #[ cfg_attr ( feature = "must-use" , must_use) ]
503
+ #[ must_use]
504
504
pub fn WebPINewRGB (
505
505
csp : WEBP_CSP_MODE ,
506
506
output_buffer : * mut u8 ,
@@ -518,7 +518,7 @@ unsafe extern "C" {
518
518
/// In this case, the output buffer will be automatically allocated (using
519
519
/// MODE_YUVA) when decoding starts. All parameters are then ignored.
520
520
/// Returns NULL if the allocation failed or if a parameter is invalid.
521
- #[ cfg_attr ( feature = "must-use" , must_use) ]
521
+ #[ must_use]
522
522
pub fn WebPINewYUVA (
523
523
luma : * mut u8 ,
524
524
luma_size : usize ,
@@ -535,7 +535,7 @@ unsafe extern "C" {
535
535
) -> * mut WebPIDecoder ;
536
536
/// Deprecated version of the above, without the alpha plane.
537
537
/// Kept for backward compatibility.
538
- #[ cfg_attr ( feature = "must-use" , must_use) ]
538
+ #[ must_use]
539
539
pub fn WebPINewYUV (
540
540
luma : * mut u8 ,
541
541
luma_size : usize ,
@@ -569,7 +569,7 @@ unsafe extern "C" {
569
569
/// (*last_y, *width etc.) can be NULL if corresponding information is not
570
570
/// needed. The values in these pointers are only valid on successful (non-NULL)
571
571
/// return.
572
- #[ cfg_attr ( feature = "must-use" , must_use) ]
572
+ #[ must_use]
573
573
pub fn WebPIDecGetRGB (
574
574
idec : * const WebPIDecoder ,
575
575
last_y : * mut c_int ,
@@ -580,7 +580,7 @@ unsafe extern "C" {
580
580
/// Same as above function to get a YUVA image. Returns pointer to the luma
581
581
/// plane or NULL in case of error. If there is no alpha information
582
582
/// the alpha pointer '*a' will be returned NULL.
583
- #[ cfg_attr ( feature = "must-use" , must_use) ]
583
+ #[ must_use]
584
584
pub fn WebPIDecGetYUVA (
585
585
idec : * const WebPIDecoder ,
586
586
last_y : * mut c_int ,
@@ -599,7 +599,7 @@ unsafe extern "C" {
599
599
/// Returns NULL in case the incremental decoder object is in an invalid state.
600
600
/// Otherwise returns the pointer to the internal representation. This structure
601
601
/// is read-only, tied to WebPIDecoder's lifespan and should not be modified.
602
- #[ cfg_attr ( feature = "must-use" , must_use) ]
602
+ #[ must_use]
603
603
pub fn WebPIDecodedArea (
604
604
idec : * const WebPIDecoder ,
605
605
left : * mut c_int ,
@@ -617,7 +617,7 @@ unsafe extern "C" {
617
617
) -> VP8StatusCode ;
618
618
/// Internal, version-checked, entry point
619
619
#[ doc( hidden) ]
620
- #[ cfg_attr ( feature = "must-use" , must_use) ]
620
+ #[ must_use]
621
621
pub fn WebPInitDecoderConfigInternal ( _: * mut WebPDecoderConfig , _: c_int ) -> c_int ;
622
622
/// Instantiate a new incremental decoder object with the requested
623
623
/// configuration. The bitstream can be passed using 'data' and 'data_size'
@@ -630,7 +630,7 @@ unsafe extern "C" {
630
630
/// The return WebPIDecoder object must always be deleted calling WebPIDelete().
631
631
/// Returns NULL in case of error (and config->status will then reflect
632
632
/// the error condition, if available).
633
- #[ cfg_attr ( feature = "must-use" , must_use) ]
633
+ #[ must_use]
634
634
pub fn WebPIDecode (
635
635
data : * const u8 ,
636
636
data_size : usize ,
@@ -649,7 +649,7 @@ unsafe extern "C" {
649
649
/// Initialize the structure as empty. Must be called before any other use.
650
650
/// Returns false in case of version mismatch
651
651
#[ allow( non_snake_case) ]
652
- #[ cfg_attr ( feature = "must-use" , must_use) ]
652
+ #[ must_use]
653
653
#[ inline]
654
654
pub unsafe extern "C" fn WebPInitDecBuffer ( buffer : * mut WebPDecBuffer ) -> c_int {
655
655
unsafe { WebPInitDecBufferInternal ( buffer, WEBP_DECODER_ABI_VERSION ) }
@@ -680,7 +680,7 @@ pub unsafe extern "C" fn WebPGetFeatures(
680
680
/// called first, unless WebPGetFeatures() is to be called.
681
681
/// Returns false in case of mismatched version.
682
682
#[ allow( non_snake_case) ]
683
- #[ cfg_attr ( feature = "must-use" , must_use) ]
683
+ #[ must_use]
684
684
#[ inline]
685
685
pub unsafe extern "C" fn WebPInitDecoderConfig ( config : * mut WebPDecoderConfig ) -> c_int {
686
686
unsafe { WebPInitDecoderConfigInternal ( config, WEBP_DECODER_ABI_VERSION ) }
0 commit comments